Returns the next representable value after x in the direction of y.
Special cases:
x == y, y is returned.x or y is a NaN, a NaN is returned.x == 0.0 and @abs(y) > 0.0, the smallest subnormal number with the sign of
y is returned.pub fn nextAfter(comptime T: type, x: T, y: T) T
pub fn nextAfter(comptime T: type, x: T, y: T) T {
return switch (@typeInfo(T)) {
.int, .comptime_int => nextAfterInt(T, x, y),
.float => nextAfterFloat(T, x, y),
else => @compileError("expected int or non-comptime float, found '" ++ @typeName(T) ++ "'"),
};
}