summaryrefslogtreecommitdiffhomepage
path: root/src/raymath.h
diff options
context:
space:
mode:
authorKim Kulling <[email protected]>2018-08-05 00:34:35 +0200
committerKim Kulling <[email protected]>2018-08-05 00:34:35 +0200
commitb2cac82fa0190952d59227442e56dbadfe789e51 (patch)
tree164738422e7607dce0d62e67bd079b470c9e4c5b /src/raymath.h
parentecf8bff4aa8b13357398e42243d1b00fd114c579 (diff)
downloadraylib-b2cac82fa0190952d59227442e56dbadfe789e51.tar.gz
raylib-b2cac82fa0190952d59227442e56dbadfe789e51.zip
Fix compiler warings in texture.c and more.
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 3b6854c7..c2dc1cf4 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -883,9 +883,9 @@ RMDEF Matrix MatrixOrtho(double left, double right, double bottom, double top, d
{
Matrix result = { 0 };
- float rl = (right - left);
- float tb = (top - bottom);
- float fn = (far - near);
+ float rl = (float)(right - left);
+ float tb = (float)(top - bottom);
+ float fn = (float)(far - near);
result.m0 = 2.0f/rl;
result.m1 = 0.0f;
@@ -980,7 +980,7 @@ RMDEF Quaternion QuaternionIdentity(void)
// Computes the length of a quaternion
RMDEF float QuaternionLength(Quaternion q)
{
- float result = sqrt(q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w);
+ float result = (float)sqrt(q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w);
return result;
}
@@ -1071,8 +1071,8 @@ RMDEF Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount)
else if (cosHalfTheta > 0.95f) result = QuaternionNlerp(q1, q2, amount);
else
{
- float halfTheta = acos(cosHalfTheta);
- float sinHalfTheta = sqrt(1.0f - cosHalfTheta*cosHalfTheta);
+ float halfTheta = (float) acos(cosHalfTheta);
+ float sinHalfTheta = (float) sqrt(1.0f - cosHalfTheta*cosHalfTheta);
if (fabs(sinHalfTheta) < 0.001f)
{