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

Method Call

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

Source from the content-addressed store, hash-verified

52}
53
54func (f *Floor) Call(args []super.Value) super.Value {
55 val := args[0]
56 switch id := val.Type().ID(); {
57 case super.IsUnsigned(id) || super.IsSigned(id):
58 return val
59 case super.IsFloat(id):
60 return super.NewFloat(val.Type(), math.Floor(val.Float()))
61 }
62 return f.sctx.WrapError("floor: not a number", val)
63}
64
65type Log struct {
66 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