math

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(

	value interface{},
) (interface{}, error)

Abs returns the absolute value of the given number @function

func Ceil

func Ceil(

	number interface{},
) int64

Ceil returns the least integer value greater than or equal to x. @function

func Floor

func Floor(

	number interface{},
) int64

Floor returns the greatest integer value less than or equal to x. @function

func Max

func Max(

	max interface{},

	rest ...interface{},
) float64

Max returns with the greatest value @function

func Min

func Min(

	min interface{},

	rest ...interface{},
) float64

Min returns with the lowest value @function

func Round

func Round(value float64) float64

Round returns the nearest integer, rounding half away from zero. @function

func Trunc

func Trunc(x float64) float64

Trunc returns the integer value of x. @function

Types

type AbsInterpreter

type AbsInterpreter struct {
}

AbsInterpreter is the Conflow interpreter for the Abs function

func (AbsInterpreter) Eval

func (i AbsInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (AbsInterpreter) Schema

func (i AbsInterpreter) Schema() schema.Schema

type CeilInterpreter

type CeilInterpreter struct {
}

CeilInterpreter is the Conflow interpreter for the Ceil function

func (CeilInterpreter) Eval

func (i CeilInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (CeilInterpreter) Schema

func (i CeilInterpreter) Schema() schema.Schema

type FloorInterpreter

type FloorInterpreter struct {
}

FloorInterpreter is the Conflow interpreter for the Floor function

func (FloorInterpreter) Eval

func (i FloorInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (FloorInterpreter) Schema

func (i FloorInterpreter) Schema() schema.Schema

type MaxInterpreter

type MaxInterpreter struct {
}

MaxInterpreter is the Conflow interpreter for the Max function

func (MaxInterpreter) Eval

func (i MaxInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (MaxInterpreter) Schema

func (i MaxInterpreter) Schema() schema.Schema

type MinInterpreter

type MinInterpreter struct {
}

MinInterpreter is the Conflow interpreter for the Min function

func (MinInterpreter) Eval

func (i MinInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (MinInterpreter) Schema

func (i MinInterpreter) Schema() schema.Schema

type RoundInterpreter

type RoundInterpreter struct {
}

RoundInterpreter is the Conflow interpreter for the Round function

func (RoundInterpreter) Eval

func (i RoundInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (RoundInterpreter) Schema

func (i RoundInterpreter) Schema() schema.Schema

type TruncInterpreter

type TruncInterpreter struct {
}

TruncInterpreter is the Conflow interpreter for the Trunc function

func (TruncInterpreter) Eval

func (i TruncInterpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)

Eval returns with the result of the function

func (TruncInterpreter) Schema

func (i TruncInterpreter) Schema() schema.Schema

Jump to

Keyboard shortcuts

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