package com.crm.rely.backend.util;

public class SafeDivideUtil {

    public static double safeDivide(int numerator, int denominator) {
        return denominator == 0 ? 0D : numerator * 1D / denominator;
    }

    public static double safeDivide(long numerator, int denominator) {
        return denominator == 0 ? 0D : numerator * 1D / denominator;
    }

    public static double safeDivide(double numerator, int denominator) {
        return denominator == 0 ? 0D : numerator / denominator;
    }

    public static double safeDivide(double numerator, double denominator) {
        return denominator == 0 ? 0D : numerator / denominator;
    }
}
