-Quaternion::Quaternion(float theta, const Vector4 &axis)
-{
- MATH_INCREASE_BY(PerformanceMonitor::FLOAT_POINT_MULTIPLY,4);
-
- Vector4 tmpAxis = axis;
- tmpAxis.Normalize();
- const float halfTheta = theta * 0.5f;
- const float sinThetaByTwo = sinf(halfTheta);
- const float cosThetaByTwo = cosf(halfTheta);
- mVector.x = tmpAxis.x * sinThetaByTwo;
- mVector.y = tmpAxis.y * sinThetaByTwo;
- mVector.z = tmpAxis.z * sinThetaByTwo;
- mVector.w = cosThetaByTwo;
-}
-
-Quaternion::Quaternion(float x, float y, float z)