Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

 

Math. is one of a number of built-in objects in JavaScript. Math. has static properties and methods for mathematical constants and functions. However, it is not a function object.

 

Selected Properties

The following lists of Math. properties and methods are the ones that are most commonly used in kBridge applications. There are literally dozens more, which you can look up in the online tutorials listed at the beginning of these syntax notes.

 

Math.E

Euler"s constant and the base of natural logarithms, approximately 2.718.

 

Math.PI

Ratio of the circumference of a circle to its diameter, approximately 3.14159.

 

Math.SQRT1_2

Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707.

 

Math.SQRT2

Square root of 2, approximately 1.414.

 

Methods

Math.abs(x)

Returns the absolute value of a number.

 

Math.asin(x)

Returns the arcsine of a number.

 

Math.asinh(x)

Returns the hyperbolic arcsine of a number.

 

Math.ceil(x)

Returns the smallest integer greater than or equal to a number.

 

Math.cos(x)

Returns the cosine of a number.

 

Math.log(x)

Returns the natural logarithm (loge, also ln) of a number.

 

Math.log10(x)

Returns the base 10 logarithm of a number.

 

Math.max([x[, y[, …]]])

Returns the largest of zero or more numbers.

 

Math.min([x[, y[, …]]])

Returns the smallest of zero or more numbers.

 

Math.round(x)

Returns the value of a number rounded to the nearest integer.

 

Math.sqrt(x)

Returns the positive square root of a number.

 

Math.tan(x)

Returns the tangent of a number.

 

Math.tanh(x)

Returns the hyperbolic tangent of a number.

 

Math.trunc(x)

Returns the integral part of the number x, removing any fractional digits.

 

Knowledge Bridge from Engingeering Intent is a full-featured engineering and sales automation environment