Missed a few f postfixes

This commit is contained in:
Josh Colclough 2023-10-27 18:30:30 +01:00
parent bb4314c863
commit d5fb1c7b66

View File

@ -64,7 +64,7 @@ int main(void)
float c[2] = { pointsOfInterest[0][0], pointsOfInterest[0][1] }; float c[2] = { pointsOfInterest[0][0], pointsOfInterest[0][1] };
// Offset and zoom to draw the julia set at. (centered on screen and default size) // Offset and zoom to draw the julia set at. (centered on screen and default size)
float offset[2] = { 0.0, 0.0 }; float offset[2] = { 0.0f, 0.0f };
float zoom = startingZoom; float zoom = startingZoom;
// Get variable (uniform) locations on the shader to connect with the program // Get variable (uniform) locations on the shader to connect with the program
@ -111,8 +111,8 @@ int main(void)
if (IsKeyPressed(KEY_R)) if (IsKeyPressed(KEY_R))
{ {
zoom = startingZoom; zoom = startingZoom;
offset[0] = 0.0; offset[0] = 0.0f;
offset[1] = 0.0; offset[1] = 0.0f;
SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT); SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT);
SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2); SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2);
} }
@ -134,8 +134,8 @@ int main(void)
// Find the velocity at which to change the camera. Take the distance of the mouse // Find the velocity at which to change the camera. Take the distance of the mouse
// from the center of the screen as the direction, and adjust magnitude based on // from the center of the screen as the direction, and adjust magnitude based on
// the current zoom. // the current zoom.
offsetVelocity.x = (mousePos.x/(float)screenWidth - 0.5)*offsetSpeedMul/zoom; offsetVelocity.x = (mousePos.x/(float)screenWidth - 0.5f)*offsetSpeedMul/zoom;
offsetVelocity.y = (mousePos.y/(float)screenHeight - 0.5)*offsetSpeedMul/zoom; offsetVelocity.y = (mousePos.y/(float)screenHeight - 0.5f)*offsetSpeedMul/zoom;
// Apply move velocity to camera // Apply move velocity to camera
offset[0] += GetFrameTime()*offsetVelocity.x; offset[0] += GetFrameTime()*offsetVelocity.x;