|
|
|
|
RetroX
|
|
Reply #4 Posted on: July 25, 2010, 07:42:55 am |
|
|
Master of all things Linux
Location: US Joined: Apr 2008
Posts: 1055
|
It fits a number within a range.
makerange(-45,0,360) should return 315, but it doesn't.
Also, I've fixed this:
inline double makerange(double value, double min, double max) { return fmod(value,abs(max-min))+(value<0 ? std::max(min,max) : std::min(min,max)); }
|
|
« Last Edit: July 25, 2010, 07:52:51 am by RetroX »
|
Logged
|
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)Why do all the pro-Microsoft people have troll avatars?
|
|
|
|
|
|
|