Add and use BT_ID_* math functions for idScalar.

This commit is contained in:
Kibeom Kim
2017-01-26 10:59:14 -08:00
parent a230c941f9
commit 761275df28
6 changed files with 53 additions and 43 deletions

View File

@@ -24,7 +24,7 @@ idScalar calculateNorm(T&);
// only implemented for vec3
template <>
idScalar calculateNorm(vec3& v) {
return std::sqrt(BT_ID_POW(v(0), 2) + BT_ID_POW(v(1), 2) + BT_ID_POW(v(2), 2));
return BT_ID_SQRT(BT_ID_POW(v(0), 2) + BT_ID_POW(v(1), 2) + BT_ID_POW(v(2), 2));
}
// template function to convert a DiffType (finite differences)