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....


Unit: SDL_math1
Class: None
Declaration: function RoundLimit (Value: double; Min, Max: int64): int64;

The function RoundLimit rounds the double precision Value to the nearest integer value within the interval [Min,Max]. If Value exceeds the interval the nearest limit is returned.

Example: The statement "y := RoundLimit (68.32,-10,10);" assigns the value 10 to y, the statement "y := RoundLimit (2.432,-10,10);" assigns the value 2

Last Update: 2017-Nov-22