Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 868 vs 869 for /trunk/Source Code/Core/Math/Headers/MathMatrices.inl

Diff revisions: vs.
  @@ -594,10 +594,10 @@
594 594
595 595 template<typename T>
596 596 template<typename U>
597 - mat3<T>::mat3(const mat2<U> &B) noexcept
597 + mat3<T>::mat3(const mat2<U> &B, bool zeroFill) noexcept
598 598 : mat3(B[0], B[1], 0,
599 599 B[2], B[3], 0,
600 - 0, 0, 0) //maybe m[8] should be 1?
600 + 0, 0, (zeroFill ? 0 : 1))
601 601 {
602 602 }
603 603
  @@ -1241,21 +1241,21 @@
1241 1241
1242 1242 template<typename T>
1243 1243 template<typename U>
1244 - mat4<T>::mat4(const mat2<U> &B) noexcept
1244 + mat4<T>::mat4(const mat2<U> &B, bool zeroFill) noexcept
1245 1245 : mat4(B[0], B[1], static_cast<U>(0), static_cast<U>(0),
1246 1246 B[2], B[3], static_cast<U>(0), static_cast<U>(0),
1247 - static_cast<U>(0), static_cast<U>(0), static_cast<U>(0), static_cast<U>(0),
1248 - static_cast<U>(0), static_cast<U>(0), static_cast<U>(0), static_cast<U>(0)) //maybe m[15] should be 1?
1247 + static_cast<U>(0), static_cast<U>(0), static_cast<U>(zeroFill ? 0 : 1), static_cast<U>(0),
1248 + static_cast<U>(0), static_cast<U>(0), static_cast<U>(0), static_cast<U>(zeroFill ? 0 : 1))
1249 1249 {
1250 1250 }
1251 1251
1252 1252 template<typename T>
1253 1253 template<typename U>
1254 - mat4<T>::mat4(const mat3<U> &B) noexcept
1254 + mat4<T>::mat4(const mat3<U> &B, bool zeroFill) noexcept
1255 1255 : mat4(B[0], B[1], B[2], static_cast<U>(0),
1256 - B[3], B[4], B[5] static_cast<U>(0),
1256 + B[3], B[4], B[5], static_cast<U>(0),
1257 1257 B[6], B[7], B[8], static_cast<U>(0),
1258 - static_cast<U>(0), static_cast<U>(0), static_cast<U>(0), static_cast<U>(0)) //maybe m[15] should be 1?
1258 + static_cast<U>(0), static_cast<U>(0), static_cast<U>(0), static_cast<U>(zeroFill ? 0 : 1))
1259 1259 {
1260 1260 }
1261 1261
  @@ -2167,7 +2167,7 @@
2167 2167 assert(!IS_ZERO(aspect));
2168 2168 assert(zFar > zNear);
2169 2169
2170 - Angle::DEGREES<F32> tanHalfFovy = std::tan(fovyRad * 0.5f);
2170 + Angle::RADIANS<F32> tanHalfFovy = std::tan(Angle::to_RADIANS(fovyRad) * 0.5f);
2171 2171
2172 2172 zero();
2173 2173