package kotlin.math; /* loaded from: classes5.dex */ public abstract class MathKt__MathJVMKt extends MathKt__MathHKt { public static int roundToInt(double d) { if (Double.isNaN(d)) { throw new IllegalArgumentException("Cannot round NaN value."); } if (d > 2.147483647E9d) { return Integer.MAX_VALUE; } if (d < -2.147483648E9d) { return Integer.MIN_VALUE; } return (int) Math.round(d); } public static int roundToInt(float f) { if (Float.isNaN(f)) { throw new IllegalArgumentException("Cannot round NaN value."); } return Math.round(f); } }