Changeset 1381
- Timestamp:
- May 13, 2012, 10:14:42 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/array.h
r1345 r1381 271 271 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4; 272 272 T5 tmp5 = m5; T6 tmp6 = m6; T7 tmp7 = m7; T8 tmp8 = m8; 273 Reserve(this->m_count * 13 / 8 + 8);273 this->Reserve(this->m_count * 13 / 8 + 8); 274 274 this->m_data[this->m_count].m1 = tmp1; 275 275 this->m_data[this->m_count].m2 = tmp2; … … 310 310 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4; 311 311 T5 tmp5 = m5; T6 tmp6 = m6; T7 tmp7 = m7; 312 Reserve(this->m_count * 13 / 8 + 8);312 this->Reserve(this->m_count * 13 / 8 + 8); 313 313 this->m_data[this->m_count].m1 = tmp1; 314 314 this->m_data[this->m_count].m2 = tmp2; … … 347 347 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4; 348 348 T5 tmp5 = m5; T6 tmp6 = m6; 349 Reserve(this->m_count * 13 / 8 + 8);349 this->Reserve(this->m_count * 13 / 8 + 8); 350 350 this->m_data[this->m_count].m1 = tmp1; 351 351 this->m_data[this->m_count].m2 = tmp2; … … 381 381 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4; 382 382 T5 tmp5 = m5; 383 Reserve(this->m_count * 13 / 8 + 8);383 this->Reserve(this->m_count * 13 / 8 + 8); 384 384 this->m_data[this->m_count].m1 = tmp1; 385 385 this->m_data[this->m_count].m2 = tmp2; … … 411 411 { 412 412 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4; 413 Reserve(this->m_count * 13 / 8 + 8);413 this->Reserve(this->m_count * 13 / 8 + 8); 414 414 this->m_data[this->m_count].m1 = tmp1; 415 415 this->m_data[this->m_count].m2 = tmp2; … … 439 439 { 440 440 T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; 441 Reserve(this->m_count * 13 / 8 + 8);441 this->Reserve(this->m_count * 13 / 8 + 8); 442 442 this->m_data[this->m_count].m1 = tmp1; 443 443 this->m_data[this->m_count].m2 = tmp2; … … 465 465 { 466 466 T1 tmp1 = m1; T2 tmp2 = m2; 467 Reserve(this->m_count * 13 / 8 + 8);467 this->Reserve(this->m_count * 13 / 8 + 8); 468 468 this->m_data[this->m_count].m1 = tmp1; 469 469 this->m_data[this->m_count].m2 = tmp2; -
trunk/src/lol/math/real.h
r1313 r1381 277 277 template<> void real::print(int ndigits) const; 278 278 279 template<> real const real::R_0; 280 template<> real const real::R_1; 281 template<> real const real::R_2; 282 template<> real const real::R_3; 283 template<> real const real::R_10; 284 285 template<> real const real::R_LN2; 286 template<> real const real::R_LN10; 287 template<> real const real::R_LOG2E; 288 template<> real const real::R_LOG10E; 289 template<> real const real::R_E; 290 template<> real const real::R_PI; 291 template<> real const real::R_PI_2; 292 template<> real const real::R_PI_3; 293 template<> real const real::R_PI_4; 294 template<> real const real::R_1_PI; 295 template<> real const real::R_2_PI; 296 template<> real const real::R_2_SQRTPI; 297 template<> real const real::R_SQRT2; 298 template<> real const real::R_SQRT3; 299 template<> real const real::R_SQRT1_2; 300 279 301 } /* namespace lol */ 280 302 -
trunk/src/lol/math/vector.h
r1369 r1381 965 965 static Quat<T> fromeuler_zyx(T phi, T theta, T psi); 966 966 967 inline Quat<T> operator *(Quat<T> const &val) const 968 { 969 Quat<T> ret; 970 Vec3<T> v1(x, y, z); 971 Vec3<T> v2(val.x, val.y, val.z); 972 Vec3<T> v3 = cross(v1, v2) + w * v2 + val.w * v1; 973 return Quat<T>(w * val.w - dot(v1, v2), v3.x, v3.y, v3.z); 974 } 967 inline Quat<T> operator *(Quat<T> const &val) const; 975 968 976 969 inline Quat<T> operator *=(Quat<T> const &val) … … 1522 1515 #undef DECLARE_ALL_VECTOR_OPS_INNER 1523 1516 #undef DECLARE_ALL_VECTOR_OPS 1517 1518 /* 1519 * Definition of additional functions requiring vector functions 1520 */ 1521 1522 template<typename T> 1523 inline Quat<T> Quat<T>::operator *(Quat<T> const &val) const 1524 { 1525 Quat<T> ret; 1526 Vec3<T> v1(x, y, z); 1527 Vec3<T> v2(val.x, val.y, val.z); 1528 Vec3<T> v3 = cross(v1, v2) + w * v2 + val.w * v1; 1529 return Quat<T>(w * val.w - dot(v1, v2), v3.x, v3.y, v3.z); 1530 } 1524 1531 1525 1532 /*
Note: See TracChangeset
for help on using the changeset viewer.