00001 #include "Point4.hpp" 00002 #include "../math/CoorT.hpp" 00003 00004 00005 namespace se_core { 00006 00007 coor_t Point4 00008 ::distance(const Point4& p1) const { 00009 return CoorT::sqrt(distanceSquared(p1)); 00010 } 00011 00012 00013 coor_t Point4 00014 ::distanceL1(const Point4& p1) const { 00015 return CoorT::abs(x_-p1.x_) + CoorT::abs(y_-p1.y_) 00016 + CoorT::abs(z_-p1.z_) + CoorT::abs(w_-p1.w_); 00017 } 00018 00019 00020 coor_t Point4 00021 ::distanceLinf(const Point4& p1) const { 00022 return CoorT::max(CoorT::abs(x_-p1.x_), CoorT::abs(y_-p1.y_), CoorT::abs(z_-p1.z_), CoorT::abs(w_-p1.w_)); 00023 } 00024 00025 }
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:13 2007 by Doxygen version 1.3.9.1.