Background for Skyrim SE
Member of the DbMiscFunctions script
floatfunctionRoundDownToDec(floatf, intDecimalPlaces=0)Global

Description

Documentation Comment

rounds the float down to the specified decimal places
Example:
RoundDownToDec(1.2345, 2) returns 1.23
RoundDownToDec(4.5678, 3) return 4.567
not 100% accurate, limited by string as float conversion.
Example: RoundDownToDec(100.78945, 2) returns 100.779999999


Caveats


Parameters

floatf

intDecimalPlaces=0


Examples

Auto-Generated Example

float myFloat__f
int myInt__DecimalPlaces

float returnedValue = DbMiscFunctions.RoundDownToDec(myFloat__f, myInt__DecimalPlaces)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.