Documentation ¶
Index ¶
- func DoArithmetic(a, b interface{}, op rune) (interface{}, error)
- type Namespace
- func (ns *Namespace) Add(a, b interface{}) (interface{}, error)
- func (ns *Namespace) Ceil(x interface{}) (float64, error)
- func (ns *Namespace) Div(a, b interface{}) (interface{}, error)
- func (ns *Namespace) Floor(x interface{}) (float64, error)
- func (ns *Namespace) Log(a interface{}) (float64, error)
- func (ns *Namespace) Mod(a, b interface{}) (int64, error)
- func (ns *Namespace) ModBool(a, b interface{}) (bool, error)
- func (ns *Namespace) Mul(a, b interface{}) (interface{}, error)
- func (ns *Namespace) Round(x interface{}) (float64, error)
- func (ns *Namespace) Sub(a, b interface{}) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoArithmetic ¶
DoArithmetic performs arithmetic operations (+,-,*,/) using reflection to determine the type of the two terms.
Types ¶
type Namespace ¶
type Namespace struct{}
Namespace provides template functions for the "math" namespace.
func New ¶
func New() *Namespace
New returns a new instance of the math-namespaced template functions.
func (*Namespace) Ceil ¶ added in v0.30.1
Ceil returns the least integer value greater than or equal to x.
func (*Namespace) Floor ¶ added in v0.30.1
Floor returns the greatest integer value less than or equal to x.
Click to show internal directories.
Click to hide internal directories.