Morrowind Mod:XHypot

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

A function added by MWSE.

xHypot returns the hypotenuse for sides a and b, c = sqrt(a*a + b*b). Unlike xSqrt this is more efficient than calculating the formula inside the script.

Syntax[edit]

hypotenuse (float): xHypot a (float) b (float)

Example[edit]

float sideA
float sideB
float result

Setx sideA to 25
Setx sideB to 25
Setx result to xHypot sideA sideB

See Also[edit]

xDistance
xSqrt
xDegRad
xRadDeg
xCos
xSin
xTan
xArcCos
xArcSin
xArcTan