SquareRoot

From the Oblivion ConstructionSet Wiki
Revision as of 06:25, 2 March 2008 by imported>DragoonWraith (note on Nth root)
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

SquareRoot [float]

or

sqrt [float]

Returns the square root of a number.

Nth Root

OBSE does not provide an Nth Root function, however, the following code can get the Nth Root, using Exp and Ln.

set NthRootOfX to ( ln x )/N
set NthRootOfX to ( exp NthRootOfX )

Example

set n to SquareRoot n