Ignore:
Timestamp:
Feb 2, 2013, 4:00:28 PM (8 years ago)
Author:
sam
Message:

math: remove coercion rules in the vector classes, they increase the
compilation time for very little benefit and maybe even confusion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/math/vector.cpp

    r2216 r2317  
    532532                   1.f - 2.f * (q.z * q.z + q.y * q.y)));
    533533
    534     return (180.0f / M_PI / n) * ret;
     534    return (float)(180.0f / M_PI / n) * ret;
    535535}
    536536
     
    539539    mat3 ret;
    540540
    541     vec3 radians = (M_PI / 180.0f) * v;
     541    vec3 radians = (float)(M_PI / 180.0f) * v;
    542542    float s0 = sin(radians[0]), c0 = cos(radians[0]);
    543543    float s1 = sin(radians[1]), c1 = cos(radians[1]);
     
    605605static inline quat quat_fromeuler_generic(vec3 const &v, int i, int j, int k)
    606606{
    607     vec3 half_angles = (M_PI / 360.0f) * v;
     607    vec3 half_angles = (float)(M_PI / 360.0f) * v;
    608608    float s0 = sin(half_angles[0]), c0 = cos(half_angles[0]);
    609609    float s1 = sin(half_angles[1]), c1 = cos(half_angles[1]);
Note: See TracChangeset for help on using the changeset viewer.