I have a class , vector which inherited from a "raw vector"
struct vector2raw {
real_t x, y;
};
struct vector2 : public vector2raw {
vector2() { null(); }
vector2(real_t x, real_t y) { this->x = x; this->y = y; }
vector2(const vector2 &v) { x = v.x; y = v.y; }
and so on
Now I want to compare two numbers, one v.y=4 from v = (5.41, 4), another min.y = 4 from min=(4,4).This is only the strange case when I compare two equal numbers, other cases are executed correctly. I get always false on (4>=4) ( v.y>=min.y) . What can be the problem?
real_t is defined to double UPD: this is written in C++