Code: Select all
Global base
base = {}
;; base:RoundTo(value, DecimalPlaces)
; Round a float to a number of decimal places
Function base:RoundTo(value, DecimalPlaces) Return(Round(value*10^DecimalPlaces)/10^DecimalPlaces) EndFunction
Code: Select all
Global base
base = {}
;; base:RoundTo(value, DecimalPlaces)
; Round a float to a number of decimal places
Function base:RoundTo(value, DecimalPlaces) Return(Round(value*10^DecimalPlaces)/10^DecimalPlaces) EndFunction