Here you can find the source of division(int i_Divisor, int i_Dividend)
public final static double division(int i_Divisor, int i_Dividend)
//package com.java2s; //License from project: Open Source License public class Main { public final static double division(short i_Divisor, short i_Dividend) { if (i_Dividend != 0) { return ((double) i_Divisor) / ((double) i_Dividend); } else {/* w w w.ja va 2 s.co m*/ return 0; } } public final static double division(Short i_Divisor, Short i_Dividend) { if (i_Divisor != null && i_Dividend != null && i_Dividend.shortValue() != 0) { return i_Divisor.doubleValue() / i_Dividend.doubleValue(); } else { return 0; } } public final static double division(int i_Divisor, int i_Dividend) { if (i_Dividend != 0) { return ((double) i_Divisor) / ((double) i_Dividend); } else { return 0; } } public final static double division(Integer i_Divisor, Integer i_Dividend) { if (i_Divisor != null && i_Dividend != null && i_Dividend.intValue() != 0) { return i_Divisor.doubleValue() / i_Dividend.doubleValue(); } else { return 0; } } public final static double division(long i_Divisor, long i_Dividend) { if (i_Dividend != 0) { return ((double) i_Divisor) / ((double) i_Dividend); } else { return 0; } } public final static double division(Long i_Divisor, Long i_Dividend) { if (i_Divisor != null && i_Dividend != null && i_Dividend.longValue() != 0) { return i_Divisor.doubleValue() / i_Dividend.doubleValue(); } else { return 0; } } public final static double division(float i_Divisor, float i_Dividend) { if (i_Dividend != 0) { return ((double) i_Divisor) / ((double) i_Dividend); } else { return 0; } } public final static double division(Float i_Divisor, Float i_Dividend) { if (i_Divisor != null && i_Dividend != null && i_Dividend.floatValue() != 0) { return i_Divisor.doubleValue() / i_Dividend.doubleValue(); } else { return 0; } } public final static double division(double i_Divisor, double i_Dividend) { if (i_Dividend != 0) { return i_Divisor / i_Dividend; } else { return 0; } } public final static double division(Double i_Divisor, Double i_Dividend) { if (i_Divisor != null && i_Dividend != null && i_Dividend.doubleValue() != 0) { return i_Divisor.doubleValue() / i_Dividend.doubleValue(); } else { return 0; } } }