List of usage examples for android.util Rational getNumerator
public int getNumerator()
From source file:com.android.camera2.its.ItsSerializer.java
@SuppressWarnings("unchecked") private static Object serializeRational(Rational rat) throws org.json.JSONException { JSONObject ratObj = new JSONObject(); ratObj.put("numerator", rat.getNumerator()); ratObj.put("denominator", rat.getDenominator()); return ratObj; }
From source file:com.android.camera2.its.ItsService.java
private static float r2f(Rational r) { return (float) r.getNumerator() / (float) r.getDenominator(); }