branch | pyrit |
changeset 60 | a23b5089b9c3 |
parent 46 | 6493fb65f0b1 |
child 91 | 9d66d323c354 |
59:64e456ab823d | 60:a23b5089b9c3 |
---|---|
48 |
48 |
49 Vector3 toVector() { return Vector3(b, c, d); }; |
49 Vector3 toVector() { return Vector3(b, c, d); }; |
50 |
50 |
51 Quaternion normalize() |
51 Quaternion normalize() |
52 { |
52 { |
53 Float f = 1.0f / sqrtf(a * a + b * b + c * c + d * d); |
53 Float f = (Float)1.0f / sqrtf(a * a + b * b + c * c + d * d); |
54 a *= f; |
54 a *= f; |
55 b *= f; |
55 b *= f; |
56 c *= f; |
56 c *= f; |
57 d *= f; |
57 d *= f; |
58 return *this; |
58 return *this; |