more mad attempts to squeeze better performance

This commit is contained in:
Mark Vejvoda
2013-06-12 17:49:12 +00:00
parent 1d7b138ac3
commit adce76d68f
3 changed files with 22 additions and 18 deletions

View File

@@ -204,7 +204,7 @@ public:
return x*v.x+y*v.y;
}
inline float dist(const Vec2<T> &v) const{
inline double dist(const Vec2<T> &v) const{
return Vec2<T>(v-*this).length();
}
@@ -231,7 +231,7 @@ public:
y/= m;
}
inline Vec2<T> rotate(float rad) {
inline Vec2<T> rotate(double rad) {
// const float
//#ifdef USE_STREFLOP
// c = streflop::cosf(rad),
@@ -246,7 +246,7 @@ public:
return Vec2<T>(x*c-y*s,x*s+y*c);
}
inline Vec2<T> rotateAround(float rad,const Vec2<T>& pt){
inline Vec2<T> rotateAround(double rad,const Vec2<T>& pt){
return pt+(*this-pt).rotate(rad);
}
@@ -447,7 +447,7 @@ public:
return x*v.x + y*v.y + z*v.z;
}
inline float dist(const Vec3<T> &v) const{
inline double dist(const Vec3<T> &v) const{
return Vec3<T>(v-*this).length();
}