I was wondering if Scala or one of its well known math libraries (e.g. Spire) has an equivalent to Go's math.Nextafter
function
package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("Now you have %g problems.",
math.Nextafter(2, 3))
}
(From http://tour.golang.org/#4)
And if not, what is the most "Scala" way to get the same functionality?