Ignore:
Timestamp:
Sep 24, 2012, 8:44:37 AM (8 years ago)
Author:
sam
Message:

math: add a uniform scaling matrix constructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/math/vector.h

    r1920 r1947  
    16971697
    16981698    /* Helpers for transformation matrices */
     1699    static Mat3<T> scale(T x);
    16991700    static Mat3<T> scale(T x, T y, T z);
    17001701    static Mat3<T> scale(Vec3<T> v);
     
    18321833    static Mat4<T> translate(T x, T y, T z);
    18331834    static Mat4<T> translate(Vec3<T> v);
     1835
     1836    static inline Mat4<T> scale(T x)
     1837    {
     1838        return Mat4<T>(Mat3<T>::scale(x), (T)1);
     1839    }
    18341840
    18351841    static inline Mat4<T> scale(T x, T y, T z)
Note: See TracChangeset for help on using the changeset viewer.