Background for Starfield

Math


Inheritance Tree

No indexed scripts extend this script.

Structs
Properties
Events
Functions
floatfunctionabs(floatafValue)NativeGlobal

Calculates the absolute value of the number it is given.

floatfunctionacos(floatafValue)NativeGlobal

Calculates the arccosine of the value it is given. The returned value is in degrees.

floatfunctionasin(floatafValue)NativeGlobal

Calculates the arcsine of the value it is given. The returned value is in degrees.

floatfunctionatan(floatafValue)NativeGlobal

Calculates the arctangent of the value it is given. The returned value is in degrees.

intfunctionCeiling(floatafValue)NativeGlobal

Calculates the smallest integer greater than or equal to the passed in value.

floatfunctioncos(floatafValue)NativeGlobal

Calculates the cosine of the value (in degrees) it is given.

floatfunctionDegreesToRadians(floatafDegrees)NativeGlobal

Converts from degrees to radians.

intfunctionFloor(floatafValue)NativeGlobal

Calculates the largest integer less than or equal to the passed in value.

floatfunctionpow(floatx, floaty)NativeGlobal

Raises x to the y power, usually written as xy.

floatfunctionRadiansToDegrees(floatafRadians)NativeGlobal

Converts from radians to degrees.

floatfunctionsin(floatafValue)NativeGlobal

Calculates the sine of the value (in degrees) it is given.

floatfunctionsqrt(floatafValue)NativeGlobal

Calculates the square root of the number it is given.

floatfunctiontan(floatafValue)NativeGlobal

Calculates the tangent of the value (in degrees) it is given.

floatfunctionMax(floatafValue1, floatafValue2)Global

Returns the larger of the two values passed in.

floatfunctionMin(floatafValue1, floatafValue2)Global

Returns the smaller of the two values passed in.

floatfunctionClamp(floatValueToClamp, floatafValueMin, floatafValueMax)Global

return clamped value

floatfunctionNormalize(floatafValue, floatafMin, floatafMax)Global

return a normalized value between 0 and 1

intfunctionRound(floatafValueToRound)Global

rounds away from zero if decimal part is >= 0.5 otherwise rounds towards zero

intfunctionExtractDigit(intnumber, intposition, intNonExistentDigit=-1)Global

extracts the value of a number at a particular position (0-based, one's place is 0)
examples:
ExtractDigit(567, 0) == 7
ExtractDigit(567, 1) == 6
ExtractDigit(567, 2) == 5
ExtractDigit(567, 999) == -1
ExtractDigit(567, 999, 0) == 0

floatfunctionHoursAsDays(floatafHours)Global

return a number days for a number of hours - useful for doing math with GameDaysPassed, etc.

floatfunctionMinutesAsDays(floatafMinutes)Global

return a number days for a number of minutes - useful for doing math with GameDaysPassed, etc.

floatfunctionSecondsAsDays(floatafSeconds)Global

return a number of days for a number of seconds - useful for doing math with GameDaysPassed, etc.

floatfunctionDaysAsHours(floatafDays)Global

return a number of hours for a number of days - useful for doing math with GameDaysPassed, etc.

floatfunctionDaysAsMinutes(floatafDays)Global

return a number of Minutes for a number of days - useful for doing math with GameDaysPassed, etc.

floatfunctionDaysAsSeconds(floatafDays)Global

return a number of Seconds for a number of days - useful for doing math with GameDaysPassed, etc.

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.