MCPcopy Create free account
hub / github.com/brimdata/super / Call

Method Call

runtime/sam/expr/function/math.go:39–48  ·  view source on GitHub ↗
(args []super.Value)

Source from the content-addressed store, hash-verified

37}
38
39func (c *Ceil) Call(args []super.Value) super.Value {
40 val := args[0]
41 switch id := val.Type().ID(); {
42 case super.IsUnsigned(id) || super.IsSigned(id):
43 return val
44 case super.IsFloat(id):
45 return super.NewFloat(val.Type(), math.Ceil(val.Float()))
46 }
47 return c.sctx.WrapError("ceil: not a number", val)
48}
49
50type Floor struct {
51 sctx *super.Context

Callers

nothing calls this directly

Calls 8

IsUnsignedFunction · 0.92
IsSignedFunction · 0.92
IsFloatFunction · 0.92
NewFloatFunction · 0.92
FloatMethod · 0.80
WrapErrorMethod · 0.80
IDMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected