Next implements the Datum interface.
(ctx context.Context, cmpCtx CompareContext)
| 903 | |
| 904 | // Next implements the Datum interface. |
| 905 | func (d *DFloat) Next(ctx context.Context, cmpCtx CompareContext) (Datum, bool) { |
| 906 | f := float64(*d) |
| 907 | if math.IsNaN(f) { |
| 908 | return DNegInfFloat, true |
| 909 | } |
| 910 | if f == math.Inf(+1) { |
| 911 | return nil, false |
| 912 | } |
| 913 | return NewDFloat(DFloat(math.Nextafter(f, math.Inf(+1)))), true |
| 914 | } |
| 915 | |
| 916 | var ( |
| 917 | // DZeroFloat is the DFloat for zero. |