How to adjust this program so the object will fit the display

I’m trying to adjust this program which creates a wavy line that goes back and forth to fit a 64x32 oled display but I cant seem to figure out how to do this. It was originally for a screen of 128x64. can anyone help me make it so it fits a 64x32?

code:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH 16

#if (SSD1306_LCDHEIGHT != 64)
#error(“Height incorrect, please fix Adafruit_SSD1306.h!”);
#endif

void setup() {
Serial.begin(9600);
delay(500);

// by default, we’ll generate the high voltage from the 3.3v line internally! (neat!)
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
// init done
display.clearDisplay();
}

void loop() {
for(float xval = 0; xval <= 128; xval++) {
double yval = -15sin(xval/5)+32;
int x = (int)xval;
int y = (int)yval;
display.drawPixel(x, y, WHITE);
display.display();
delay(5);
}
for(float xval = 128; xval >= 0; xval–) {
double yval = -15
sin(xval/5)+32;
int x = (int)xval;
int y = (int)yval;
display.drawPixel(x, y, BLACK);
display.display();
delay(5);
}
}

What happens when you change the 128 in the for loops to 64 and the 32 in the yval calculation to 16?