Changeset 643


Ignore:
Timestamp:
Feb 14, 2011, 2:26:26 AM (10 years ago)
Author:
sam
Message:

Do not zero vector memory upon initialisation. Unitialised is uninitialised.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matrix.h

    r641 r643  
    105105template <typename T> struct Vec2
    106106{
    107     inline Vec2() { x = y = 0; }
     107    inline Vec2() { }
    108108    inline Vec2(T val) { x = y = val; }
    109109    inline Vec2(T _x, T _y) { x = _x; y = _y; }
     
    120120template <typename T> struct Vec3
    121121{
    122     inline Vec3() { x = y = z = 0; }
     122    inline Vec3() { }
    123123    inline Vec3(T val) { x = y = z = val; }
    124124    inline Vec3(T _x, T _y, T _z) { x = _x; y = _y; z = _z; }
     
    136136template <typename T> struct Vec4
    137137{
    138     inline Vec4() { x = y = z = w = 0; }
     138    inline Vec4() { }
    139139    inline Vec4(T val) { x = y = z = w = val; }
    140140    inline Vec4(T _x, T _y, T _z, T _w) { x = _x; y = _y; z = _z; w = _w; }
     
    178178template <typename T> struct Vec4x4
    179179{
    180     inline Vec4x4() { v[0] = v[1] = v[2] = v[3] = 0; }
     180    inline Vec4x4() { }
    181181    inline Vec4x4(T val) { v[0] = v[1] = v[2] = v[3] = val; }
    182182    inline Vec4x4(Vec4<T> v0, Vec4<T> v1, Vec4<T> v2, Vec4<T> v3)
Note: See TracChangeset for help on using the changeset viewer.