math

package
v1.23.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	E       = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113
	LN10    = 2.30258509299404568401799145468436420760110148862877297603332790
	LN2     = 0.693147180559945309417232121458176568075500134360255254120680009 // https://oeis.org/A002162
	LOG10E  = 1 / LN10
	LOG2E   = 1 / LN2
	PI      = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.org/A000796
	SQRT1_2 = SQRT_2 / 2                                                       // https://oeis.org/A002162
	SQRT_2  = 1.41421356237309504880168872420969807856967187537694807317667974 // https://oeis.org/A002193
)

Mathematical constants.

View Source
const (
	XGoJSPackage = "Math"
)

Variables

This section is empty.

Functions

func Atan2

func Atan2(y, x primitive.Number) primitive.Number

func F16round

func F16round(primitive.Number) primitive.Number

func Hypot

func Hypot(p, q primitive.Number) primitive.Number

func Max

func Min

func Pow

func Pow(x, y primitive.Number) primitive.Number

func Random

func Random() primitive.Number

func Sign

func SumPrecise

func SumPrecise([]primitive.Number) primitive.Number

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL