[no bug, just not nice]Comparative Operations On Position2d
Posted: Tue Mar 18, 2014 5:22 am
Hello, I'm not sure if this functionality is supposed to be present but it allowed me to do a comparison without compiler errors. Here is the problem, doing a comparison on irr::core::vector2d<irr::s32> weather it is < or > only compares the X value.
When doing the comparison:
A.X is > B.X but A.Y !> B.Y but the output is that A > B
When doing the comparison:
Code: Select all
void Compare()
{
irr::core::position2d<irr::s32> A(30, 50);
irr::core::position2d<irr::s32> B(10, 60);
if (A > B)
{
std::cout << "A > B" << std::endl;
}
else {
std::cout << "A !> B" << std::endl;
}
}