git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@188 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
385301229d
commit
1e85d940bd
|
@ -50,6 +50,8 @@ class Time {
|
||||||
Time operator+(const Time& time2) const; // Overloaded operator for addition with Time
|
Time operator+(const Time& time2) const; // Overloaded operator for addition with Time
|
||||||
Time operator-(const Time& time2) const throw(std::invalid_argument); // Overloaded operator for substraction with Time
|
Time operator-(const Time& time2) const throw(std::invalid_argument); // Overloaded operator for substraction with Time
|
||||||
Time operator*(double number) const throw(std::invalid_argument); // Overloaded operator for multiplication with a number
|
Time operator*(double number) const throw(std::invalid_argument); // Overloaded operator for multiplication with a number
|
||||||
|
bool operator<(const Time& time2) const; // Overloaded operator for less than comparison
|
||||||
|
bool operator>(const Time& time2) const; // Overloaded operator for greater than comparison
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- Inlines functions --- //
|
// --- Inlines functions --- //
|
||||||
|
@ -104,6 +106,18 @@ inline Time Time::operator*(double number) const throw(std::invalid_argument) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Overloaded operator for less than comparison
|
||||||
|
// TODO : TEST THIS METHOD
|
||||||
|
inline bool Time::operator<(const Time& time2) const {
|
||||||
|
return (getValue() < time2.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Overloaded operator for greater than comparison
|
||||||
|
// TODO : TEST THIS METHOD
|
||||||
|
inline bool Time::operator>(const Time& time2) const {
|
||||||
|
return (getValue() > time2.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user