(args ...vector.Any)
| 107 | } |
| 108 | |
| 109 | func (f *Floor) Call(args ...vector.Any) vector.Any { |
| 110 | if vec, ok := expr.CheckForNullThenError(args); ok { |
| 111 | return vec |
| 112 | } |
| 113 | vec := vector.Under(args[0]) |
| 114 | switch id := vec.Type().ID(); { |
| 115 | case super.IsFloat(id): |
| 116 | return f.floor(vec) |
| 117 | case super.IsNumber(id): |
| 118 | return vec |
| 119 | } |
| 120 | return vector.NewWrappedError(f.sctx, "floor: not a number", vec) |
| 121 | } |
| 122 | |
| 123 | func (f *Floor) floor(vec vector.Any) vector.Any { |
| 124 | switch vec := vec.(type) { |
nothing calls this directly
no test coverage detected