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