|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack Math1 Comparison & Limiting RoundDegrees|
|See also: ConvertDegrees, GeoLatitude, GeoLongitude, Round125|
The procedure RoundDegrees rounds a given angle (specified by the variable parameters Deg, Min and Sec, for degrees, minutes, and seconds, respectively) either down or up to the next integer part of 60. The parameter RoundUp determines whether the values are rounded down (FALSE) or up (TRUE). The parameters Min and Sec must not contain values outside the valid numeric range of 0 to 59. Negative values are not processed at all and return all-zero values.
The result of the rounding is returned in the variable parameters Deg, Min and Sec. Values between 0 and 60 [degrees/minutes/seconds] are rounded to the following thresholds: 0,1,2,3,5,10,15,20,30,60. Values between 60 and 360 degrees are rounded to 60, 90, 180 or 360 degrees. Values greater than 360 degrees are always rounded to 360 degrees, no matter whether RoundUp is TRUE or FALSE.