Changeset 1947
- Timestamp:
- Sep 24, 2012, 8:44:37 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lol/math/vector.h
r1920 r1947 1697 1697 1698 1698 /* Helpers for transformation matrices */ 1699 static Mat3<T> scale(T x); 1699 1700 static Mat3<T> scale(T x, T y, T z); 1700 1701 static Mat3<T> scale(Vec3<T> v); … … 1832 1833 static Mat4<T> translate(T x, T y, T z); 1833 1834 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 } 1834 1840 1835 1841 static inline Mat4<T> scale(T x, T y, T z) -
trunk/src/math/vector.cpp
r1807 r1947 304 304 << ", " << m[2][3] << ", " << m[3][3] << "))"; 305 305 return stream; 306 } 307 308 template<> mat3 mat3::scale(float x) 309 { 310 mat3 ret(1.0f); 311 312 ret[0][0] = x; 313 ret[1][1] = x; 314 ret[2][2] = x; 315 316 return ret; 306 317 } 307 318
Note: See TracChangeset
for help on using the changeset viewer.