Review code format

This commit is contained in:
Ray 2021-05-29 13:56:08 +02:00
parent e3ba11bead
commit c828e481fb
2 changed files with 24 additions and 24 deletions

View file

@ -1390,27 +1390,27 @@ RMDEF Matrix QuaternionToMatrix(Quaternion q)
{
Matrix result = MatrixIdentity();
float a2 = q.x * q.x;
float b2 = q.y * q.y;
float c2 = q.z * q.z;
float ac = q.x * q.z;
float ab = q.x * q.y;
float bc = q.y * q.z;
float ad = q.w * q.x;
float bd = q.w * q.y;
float cd = q.w * q.z;
float a2 = q.x*q.x;
float b2 = q.y*q.y;
float c2 = q.z*q.z;
float ac = q.x*q.z;
float ab = q.x*q.y;
float bc = q.y*q.z;
float ad = q.w*q.x;
float bd = q.w*q.y;
float cd = q.w*q.z;
result.m0 = 1 - 2 * (b2 + c2);
result.m1 = 2 * (ab + cd);
result.m2 = 2 * (ac - bd);
result.m0 = 1 - 2*(b2 + c2);
result.m1 = 2*(ab + cd);
result.m2 = 2*(ac - bd);
result.m4 = 2 * (ab - cd);
result.m5 = 1 - 2 * (a2 + c2);
result.m6 = 2 * (bc + ad);
result.m4 = 2*(ab - cd);
result.m5 = 1 - 2*(a2 + c2);
result.m6 = 2*(bc + ad);
result.m8 = 2 * (ac + bd);
result.m9 = 2 * (bc - ad);
result.m10 = 1 - 2 * (a2 + b2);
result.m8 = 2*(ac + bd);
result.m9 = 2*(bc - ad);
result.m10 = 1 - 2*(a2 + b2);
return result;
}