#include <edge_collide.h>
Nevrax France
Definition at line 123 of file edge_collide.h.
Public Member Functions | |
| CRational64 (sint64 num, sint64 den) | |
| CRational64 (sint64 a) | |
| CRational64 () | |
| bool | operator< (const CRational64 &o) const |
| operator< | |
| bool | operator== (const CRational64 &o) const |
| operator== | |
Data Fields | |
| sint64 | Denominator |
| Denominator. always >0. | |
| sint64 | Numerator |
| Numerator. | |
|
|
Definition at line 134 of file edge_collide.h.
00134 {}
|
|
|
Definition at line 135 of file edge_collide.h. References Denominator, Numerator, and sint64.
00135 : Numerator(a), Denominator(1) {} |
|
||||||||||||
|
Definition at line 136 of file edge_collide.h. References Denominator, num, Numerator, and sint64.
00137 {
00138 if(den>0)
00139 {
00140 Numerator= num;
00141 Denominator= den;
00142 }
00143 else
00144 {
00145 Numerator= -num;
00146 Denominator= -den;
00147 }
00148 }
|
|
|
operator<
Definition at line 151 of file edge_collide.h. References Denominator, Numerator, and NLPACS::CInt128::setMul().
00152 {
00153 CInt128 n0, n1;
00154 // a/b < c/d <=> a*d < c*b
00155 n0.setMul(Numerator, o.Denominator);
00156 n1.setMul(o.Numerator, Denominator);
00157 return n0<n1;
00158 }
|
|
|
operator==
Definition at line 161 of file edge_collide.h. References Denominator, Numerator, and NLPACS::CInt128::setMul().
00162 {
00163 CInt128 n0, n1;
00164 // a/b == c/d <=> a*d == c*b
00165 n0.setMul(Numerator, o.Denominator);
00166 n1.setMul(o.Numerator, Denominator);
00167 return n0==n1;
00168 }
|
|
|
Denominator. always >0.
Definition at line 129 of file edge_collide.h. Referenced by CRational64(), operator<(), operator==(), and NLPACS::CGlobalRetriever::testMovementWithCollisionChains(). |
|
|
Numerator.
Definition at line 127 of file edge_collide.h. Referenced by CRational64(), operator<(), operator==(), and NLPACS::CGlobalRetriever::testMovementWithCollisionChains(). |
1.3.6