All pastes #13705 Raw Edit

Stuff

public text v1 · immutable
#13705 ·published 2005-06-08 05:22 UTC
rendered paste body
	static public Object evalForJinni(Number fun) {
		if (fun instanceof Integer)	return fun;
		if (fun instanceof Double) return fun;
		double d = fun.doubleValue();
		if (fun instanceof Long) {
			if (d<Integer.MAX_VALUE) {
				return new Integer(fun.intValue());
			}
		}
		return new Double(d);
	}