wdte: github.com/DeedleFake/wdte/std/math Index | Files

package math

import "github.com/DeedleFake/wdte/std/math"

Package math contains wdte.Funcs for performing mathematical operations.

Index

Package Files

math.go

Constants

const (
    E     wdte.Number = math.E
    Pi    wdte.Number = math.Pi
    Sqrt2 wdte.Number = math.Sqrt2
)

A number of useful constants. To see the IDs under which they are exported, see Scope.

Variables

var Scope = wdte.S().Map(map[wdte.ID]wdte.Func{
    "e":     E,
    "pi":    Pi,
    "sqrt2": Sqrt2,

    "sin": wdte.GoFunc(Sin),
    "cos": wdte.GoFunc(Cos),
    "tan": wdte.GoFunc(Tan),

    "floor": wdte.GoFunc(Floor),
    "ceil":  wdte.GoFunc(Ceil),
    "abs":   wdte.GoFunc(Abs),
})

Scope is a scope that contains the functions in this package.

func Abs Uses

func Abs(frame wdte.Frame, args ...wdte.Func) wdte.Func

Abs is a WDTE function with the following signature:

abs n

Returns |n|.

func Ceil Uses

func Ceil(frame wdte.Frame, args ...wdte.Func) wdte.Func

Ceil is a WDTE function with the following signature:

ceil n

Returns ⌈n⌉.

func Cos Uses

func Cos(frame wdte.Frame, args ...wdte.Func) wdte.Func

Cos is a WDTE function with the following signature:

cos n

Returns the cosine of n.

func Floor Uses

func Floor(frame wdte.Frame, args ...wdte.Func) wdte.Func

Floor is a WDTE function with the following signature:

floor n

Returns ⌊n⌋.

func Sin Uses

func Sin(frame wdte.Frame, args ...wdte.Func) wdte.Func

Sin is a WDTE function with the following signature:

sin n

Returns the sine of n.

func Tan Uses

func Tan(frame wdte.Frame, args ...wdte.Func) wdte.Func

Tan is a WDTE function with the following signature:

tan n

Returns the tangent of n.

Package math imports 3 packages (graph) and is imported by 1 packages. Updated 2018-03-15. Refresh now. Tools for package owners.