Powers extension

Adds methods to get the square root of a num and to determine if a num is square.

on

Properties

isCube bool
Returns true if this is equal to a whole integer cubed.
no setter
isSquare bool
Returns true if this equals a whole integer squared.
no setter

Methods

cbrt() double
Returns the cube root of this.
cubed() num
Returns the value of this cubed.
isPowerOf(num factor) bool
Returns true if this is a valid power of factor.
pow(num exponent) num
Returns this to the power of exponent.
root(num factor) double
Returns the root of this factored by factor.
sqrt() double
Returns the square root of this.
squared() num
Returns the value of this squared.