@intFromFloat

@intFromFloat

@intFromFloat(float: anytype) anytype

Converts the integer part of a floating point number to the inferred result type.

If the integer part of the floating point number cannot fit in the destination type, it invokes safety-checked Undefined Behavior.

See also:

  • @floatFromInt