Prev implements the Datum interface.
(_ *EvalContext)
| 802 | |
| 803 | // Prev implements the Datum interface. |
| 804 | func (d *DFloat) Prev(_ *EvalContext) (Datum, bool) { |
| 805 | f := float64(*d) |
| 806 | if math.IsNaN(f) { |
| 807 | return nil, false |
| 808 | } |
| 809 | if f == math.Inf(-1) { |
| 810 | return dNaNFloat, true |
| 811 | } |
| 812 | return NewDFloat(DFloat(math.Nextafter(f, math.Inf(-1)))), true |
| 813 | } |
| 814 | |
| 815 | // Next implements the Datum interface. |
| 816 | func (d *DFloat) Next(_ *EvalContext) (Datum, bool) { |