Tuple4.cpp

Go to the documentation of this file.
00001 #include "Tuple4.hpp"
00002 #include "../math/CoorT.hpp"
00003 #include <cstdio>
00004 
00005 namespace se_core {
00006 
00007     bool Tuple4
00008     ::epsilonEquals(const Tuple4& t1, coor_t epsilon) const {
00009         return (CoorT::abs(t1.x_ - x_) <= epsilon) &&
00010             (CoorT::abs(t1.y_ - y_) <= epsilon) &&
00011             (CoorT::abs(t1.z_ - z_) <= epsilon) &&
00012             (CoorT::abs(t1.w_ - w_) <= epsilon);
00013     }
00014 
00015 
00016     char* Tuple4
00017     ::toString(char* buffer) const {
00018         sprintf(buffer, "(%f,%f,%f,%f)", x_ * 1.0, y_ * 1.0, z_ * 1.0, w_ * 1.0);
00019         return buffer;
00020     }
00021 
00022 
00023     const char* Tuple4
00024     ::toLog() const {
00025         sprintf(log_msg(), "(%f, %f, %f, %f)", x_, y_, z_, w_);
00026         return log_msg();
00027     }
00028 
00029     bool Tuple4
00030     ::isNan() const {
00031         return x_ != x_ || y_ != y_ || z_ != z_ || w_ != w_;
00032     }
00033 
00034 }

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:13 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo