| 286 | // parameter to within the range of 0 to 360. |
| 287 | |
| 288 | real Mod(real d) |
| 289 | { |
| 290 | if (d >= rDegMax) // In most cases, value is only slightly |
| 291 | d -= rDegMax; // out of range, so can test for it and |
| 292 | else if (d < 0.0) // avoid the more complicated arithmetic. |
| 293 | d += rDegMax; |
| 294 | if (d >= 0 && d < rDegMax) |
| 295 | return d; |
| 296 | return (d - RFloor(d/rDegMax)*rDegMax); |
| 297 | } |
| 298 | |
| 299 | |
| 300 | // Integer division, like the "/" operator but always rounds result down. |
no outgoing calls
no test coverage detected