Skip to content

Math.FastSqrt

Name Mandatory Description Default Type
⬅️ Input The input float or sequence of floats to calculate the square root of. This value must be a positive number or sequence of positive numbers. FloatFloat2Float3Float4Color[Any]
Output ➡️ Outputs the square root of the input. FloatFloat2Float3Float4Color[Any]

This shard calculates the square root of the given input.

Details

This shard calculates the square root of a number faster than Math.Sqrt, but is less accurate. For most everyday numbers, the difference is negligible. The difference is more pronounced for very large numbers, very small numbers, or numbers very close to perfect squares.

If a sequence of floats was provided as input, the shard will calculate the square root of each element in the sequence and output a sequence.

If a sequence of vectors was provided as input, the shard will calculate the square root of each component in each vector in the sequence and output a sequence of vectors where each component in each vector is the square root of the corresponding component in the input sequence.

Examples

1
2
3
4.0 | Math.FastSqrt | Log
Math.Subtract(2.0) | Math.Abs
IsLess(0.00001) | Assert.Is(true Break: true)

[info] [sample-wire] 1.99999