[][src]Module faunadb::query::math

Math functions

Structs

Abs

The Abs function is used to get the absolute value of a number.

Acos

The Acos function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. Acos returns the arc cosine of a number.

Add

The Add function returns the sum of its numeric arguments.

Asin

The Asin function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. Asin returns the arc sine of a number.

Atan

The Atan function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. Atan returns the arc tangent of a number.

BitAnd

The BitAnd function returns the bit to the result if the bit exists in all numbers. The arguments must be numbers, and fractional values are truncated before the operation is applied. The result is the bitwise AND of all the arguments.

BitNot

The BitNot function returns the Two’s Complement of a number. The argument must be a number, and fractional values are truncated before the operation is applied.

BitOr

The BitOr function returns the bit to the result if the bit exists in any argument. The arguments must be numbers, and the fractional portion is truncated before the or operation is applied. The result is the bitwise OR of all the arguments.

BitXor

The BitXor function returns the bit to the result if the bit exists in only one argument. The arguments must be numbers, and the fractional portion is truncated before the XOR operation is applied. The result is the bitwise exclusive OR of all of the arguments.

Ceil

The Ceil function returns a value that is greater than or equal to the argument and is equal to the nearest mathematical integer.

Cos

The Cos function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. The Cos returns the cosine of a number.

Cosh

The Cosh function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. The Cosh returns the hyperbolic cosine of a number.

Degrees

The Degrees function converts a specified number from radians to degrees. The argument is an angle measured in radians, which is converted to an approximate angle measured in degrees.

Divide

The Divide function computes the quotient of two or more numbers.

Exp

The Exp function returns Euler’s number e (approximately 2.71828) raised to a power provided as the operand.

Floor

The Floor function returns the largest value that is less than or equal to the argument and is equal to a mathematical integer.

Hypot

The Hypot function calculates the length of the hypotenuse of a right-angle triangle given the length of the other two sides.

Ln

The Ln function returns the natural logarithm (base e) of the operand.

Log

The Log function returns the natural logarithm (base 10) of the operand.

Max

The Max function returns the largest value in a list of numbers.

Min

The Min function returns the smallest value in a list of numbers.

Modulo

The Modulo function computes the remainder after division on a list of numbers. Providing a single operand returns the operand.

Multiply

The Multiply function computes the product of a list of numbers. Providing a single number returns the number.

Pow

The Pow function raises its first numeric argument, the base, to the power of its second numeric argument, the exponent.

Radians

The Radians function translates a specified number from degrees to radians.

Round

The Round function returns a number which is the nearest mathematic value of the operand to the specified precision as a double value.

Sign

The Sign function returns the sign of the argument as a numeric value.

Sin

The Sin function is a trigonometric function which calculates ratios of the lengths of the sides of right triangles. The Sin returns the sine of a number, which is the ratio of the side opposite to an acute angle in a right triangle to the hypotenuse.

Sinh

A trigonometric function that returns the hyperbolic sine of a number.

Sqrt

The Sqrt function returns the positive square root of a number value.

Subtract

The Subtract function returns the difference of a list of numbers.

Tan

A trigonometric function that returns the tangent of a number, which is the ratio of the side opposite to an acute angle in a right triangle to the side adjacent.

Tanh

A trigonometric function that returns the hyperbolic tangent of a number.

Trunc

The Trunc function returns a number which is the nearest mathematic value less than or equal to the operand to the specified precision as a double value.