Game Development Community

Math inline comparison bug in TSE

by David Dougher · in Torque Game Engine Advanced · 08/07/2005 (11:25 am) · 4 replies

In math/mPoint.h around line 861 you have the inline declaration

inline bool Point2F::operator==(const Point2F& _test) const
{
return (x == _test.x) && (y == _test.x);
}

I believe it should be...

inline bool Point2F::operator==(const Point2F& _test) const
{
return (x == _test.x) && (y == _test.y);
}

Note: the last comparison should be to y and not x

About the author

Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence


#1
08/07/2005 (1:14 pm)
And Point2D has the same problem - but they're both already fixed in 1.4 trunk. Good eye, David!
#2
08/07/2005 (1:41 pm)
Is the 1.4 trunk going to be applied to both TSE and TGE? I ask, since I was pointing out a TSE error and your reply indicates that it has been fixed in TGE... (at least I thought that 1.4 was just a TGE upgrade not an effort to bring TGE and TSE into alignment. If I'm wrong then I am a LOT more interested in 1.4's release... )
#3
08/07/2005 (1:43 pm)
Ahh... Yeah, good point. ;)

A lot of the fixes from 1.4 are going to migrate into TSE, naturally. Any immediate fixing to this is going to have to be done by Brian, though.
#4
08/07/2005 (7:40 pm)
Periodically TSE merges changes from TGE. We'll do one for MS3, probably to 1.4. I'll try and get this bug fix up sooner than the merge though.