00001 #include "Tuple2.hpp" 00002 #include "../math/CoorT.hpp" 00003 #include <cstdio> 00004 00005 namespace se_core { 00006 00007 bool Tuple2 00008 ::epsilonEquals(const Tuple2& t1, coor_t epsilon) const { 00009 return (CoorT::abs(t1.x_ - x_) <= epsilon) && 00010 (CoorT::abs(t1.y_ - y_) <= epsilon); 00011 } 00012 00013 00014 char* Tuple2 00015 ::toString(char* buffer) const { 00016 sprintf(buffer, "(%f,%f)", x_ * 1.0, y_ * 1.0); 00017 return buffer; 00018 } 00019 00020 bool Tuple2 00021 ::isNan() const { 00022 return x_ != x_ || y_ != y_; 00023 } 00024 00025 00026 se_err::Log& operator<< (se_err::Log& log, const Tuple2& t) { 00027 log << "(" << t.x_ << ", " << t.y_ << ")"; 00028 return log; 00029 } 00030 00031 }
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:13 2007 by Doxygen version 1.3.9.1.