maxValue
Return a typed copy of the max value
Parameters
- self:*const NumberFieldOptions
- *const NumberFieldOptions
- T:type
- type
Source
Implementation
pub fn maxValue(self: *const NumberFieldOptions, T: type) T {
return switch (@typeInfo(T)) {
.int => @trunc(@as(f64, self.max orelse @min(std.math.maxInt(T), std.math.maxInt(u53)))),
.float => @floatCast(self.max orelse std.math.floatMax(T)),
else => unreachable,
};
}