HUGO
News Docs Themes Community GitHub

math.Abs

math.Abs VALUE

Returns the absolute value of the given number.

math.Acos

math.Acos VALUE

Returns the arccosine, in radians, of the given number.

math.Add

math.Add VALUE VALUE...

Adds two or more numbers.

math.Asin

math.Asin VALUE

Returns the arcsine, in radians, of the given number.

math.Atan

math.Atan VALUE

Returns the arctangent, in radians, of the given number.

math.Atan2

math.Atan2 VALUE VALUE

Returns the arctangent, in radians, of the given number pair, determining the correct quadrant from their signs.

math.Ceil

math.Ceil VALUE

Returns the least integer value greater than or equal to the given number.

math.Cos

math.Cos VALUE

Returns the cosine of the given radian number.

math.Counter

math.Counter

Increments and returns a global counter.

math.Div

math.Div VALUE VALUE...

Divides the first number by one or more numbers.

math.Floor

math.Floor VALUE

Returns the greatest integer value less than or equal to the given number.

math.Log

math.Log VALUE

Returns the natural logarithm of the given number.

math.Max

math.Max VALUE...

Returns the greater of all numbers. Accepts scalars, slices, or both.

math.Min

math.Min VALUE...

Returns the smaller of all numbers. Accepts scalars, slices, or both.

math.Mod

math.Mod VALUE1 VALUE2

Returns the modulus of two integers.

math.ModBool

math.ModBool VALUE1 VALUE2

Reports whether the modulus of two integers equals 0.

math.Mul

math.Mul VALUE VALUE...

Multiplies two or more numbers.

math.Pi

math.Pi

Returns the mathematical constant pi.

math.Pow

math.Pow VALUE1 VALUE2

Returns the first number raised to the power of the second number.

math.Product

math.Product VALUE...

Returns the product of all numbers. Accepts scalars, slices, or both.

math.Rand

math.Rand

Returns a pseudo-random number in the half-open interval [0.0, 1.0).

math.Round

math.Round VALUE

Returns the nearest integer, rounding half away from zero.

math.Sin

math.Sin VALUE

Returns the sine of the given radian number.

math.Sqrt

math.Sqrt VALUE

Returns the square root of the given number.

math.Sub

math.Sub VALUE VALUE...

Subtracts one or more numbers from the first number.

math.Sum

math.Sum VALUE...

Returns the sum of all numbers. Accepts scalars, slices, or both.

math.Tan

math.Tan VALUE

Returns the tangent of the given radian number.

math.ToDegrees

math.ToDegrees VALUE

ToDegrees converts radians into degrees.

math.ToRadians

math.ToRadians VALUE

ToRadians converts degrees into radians.