00001 #include "Vector2.hpp" 00002 00003 #include "../math/CoorT.hpp" 00004 #include "../math/BrayT.hpp" 00005 #include "../math/Trig.hpp" 00006 00007 namespace se_core { 00008 00009 coor_t Vector2 00010 ::length() const { 00011 return CoorT::sqrt(lengthSquared()); 00012 } 00013 00014 00015 bray_t Vector2 00016 ::angle(const Vector2& v1) const { 00017 // stabler than acos 00018 return BrayT::abs(Trig::atan2(x_*v1.y_ - y_*v1.x_ , dot(v1))); 00019 } 00020 00021 }
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:13 2007 by Doxygen version 1.3.9.1.