RoundAlt

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Rounds Floating Point Number to specified number of decimal places.

Syntax

[help]
(fValue:float) RoundAlt fValue:float Precision:int{0-4} Round:int

Example

set fRoundTestVar to RoundAlt 37.55 0 0 
Print "Will return 37"
		
set fRoundTestVar to RoundAlt 37.55 1 0 
Print "Will return 37.5"
		
set fRoundTestVar to RoundAlt 37.6 1 0 
Print "Will return 37.6"
		
set fRoundTestVar to RoundAlt 37.66 1 1
Print "Will return 37.7"
		
set fRoundTestVar to RoundAlt 37.665454 3 1
Print "Will return 37.665"
		
set fRoundTestVar to RoundAlt 37.665654 3 1
Print "Will return 37.666"   

See Also