aboutsummaryrefslogtreecommitdiff
path: root/src/raymath.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2014-12-16 11:15:56 +0100
committerraysan5 <raysan5@gmail.com>2014-12-16 11:15:56 +0100
commit2e5f58255a391323fef54afc895a1d5a8ba06344 (patch)
treeb13e79f6831a6bb8f61fc46f1c694304c6061825 /src/raymath.c
parentcfa60ab7e6313f85594f63d2830fdc2ce19e180e (diff)
downloadraylib-2e5f58255a391323fef54afc895a1d5a8ba06344.tar.gz
raylib-2e5f58255a391323fef54afc895a1d5a8ba06344.zip
Working on rotation math...
[models] Added DrawQuad()
Diffstat (limited to 'src/raymath.c')
-rw-r--r--src/raymath.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/raymath.c b/src/raymath.c
index e598b381..56b79b42 100644
--- a/src/raymath.c
+++ b/src/raymath.c
@@ -559,8 +559,8 @@ Matrix MatrixFromAxisAngle2(Vector3 axis, float angle)
float axisX = axis.x, axisY = axis.y, axisZ = axis.y;
// Calculate angles
- float cosres = (float)cos(-angle);
- float sinres = (float)sin(-angle);
+ float cosres = (float)cos(angle);
+ float sinres = (float)sin(angle);
float t = 1.0f - cosres;
// Do the conversion math once
@@ -672,6 +672,8 @@ Matrix MatrixTransform(Vector3 translation, Vector3 rotation, Vector3 scale)
{
Matrix result = MatrixIdentity();
+ // TODO: Review, use DEG2RAD here?
+ //Matrix mRotation = MatrixRotate(rotation.x*DEG2RAD, rotation.y*DEG2RAD, rotation.z*DEG2RAD);
Matrix mRotation = MatrixRotate(rotation.x, rotation.y, rotation.z);
Matrix mScale = MatrixScale(scale.x, scale.y, scale.z);
Matrix mTranslate = MatrixTranslate(translation.x, translation.y, translation.z);