# floats not floating ...?

I’m missing something here! my x-y coordinates aren’t being set straight.
a second pair of eyes would be appreiated

The y_axis values are 0 ??

``````void displayCurve(void){
int x_axis, y_axis;
float rd;
float sna;

for (i=0;i<180;i++) {
rd = i * (PI / 180);
//  sna=sin(rd);
x_axis = (i/1.5)+5;
y_axis = 118- (sin(rd)*100);
y_axis = 118-(sin(rd)*( (ColorRatio[1] / 255) * 118 ));
LCDSetPixel(y_axis, x_axis, BLUE);
y_axis = 118-(sin(rd)*( (ColorRatio[1] / 255) * 118 ));
LCDSetPixel(y_axis, x_axis, PINK);
y_axis = 118-(sin(rd)*( (ColorRatio[2] / 255) * 118 ));
LCDSetPixel(y_axis, x_axis, WHITE);
y_axis = 118-(sin(rd)*( (ColorRatio[3] / 255) * 118 ));
LCDSetPixel(y_axis, x_axis, RED);
y_axis = 118-(sin(rd)*( (ColorRatio[4] / 255) * 118 ));
LCDSetPixel(y_axis, x_axis, GREEN);
}
}
``````

y_axis = 118.0 - (sin(rd)*( (ColorRatio[1] / 255.0) * 118.0 ));

• OR -

y_axis = 118f - (sin(rd)*( (ColorRatio[1] / 255f) * 118f ));

THANKS! Couldn't see the wood for the trees