Retro Rocket OS
Loading...
Searching...
No Matches
MINR Function
MINR(a, b)

Returns the smaller of two real values.


Examples

REM Simple comparison
PRINT MINR(3.5, 7.2)
REM Clamp a value to a maximum
VALUE# = 5.75
VALUE# = MINR(VALUE#, 3.0)
PRINT VALUE#
REM Use in an expression
A# = 2.75
B# = 2.80
PRINT "Smallest is "; MINR(A#, B#)

Notes

  • Both parameters must be real expressions.
  • Returns whichever value is lower.
  • Commonly used for clamping values or enforcing upper bounds with real numbers.
  • For integer values, use MIN.

See also: MIN · MAXR · ABS