Page 1 of 1

baseRoundTo()

Posted: Wed Apr 15, 2015 10:51 pm
by djrikki

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