Avoid potential negative array index access to cached text.
[LibreOffice.git] / android / source / src / java / org / libreoffice / UnitConverter.java
blobf668021b0cd71867b38e6892747ee8e0c1259681
1 package org.libreoffice;
4 public class UnitConverter {
5 public static float twipToPixel(float input, float dpi) {
6 return input / 1440.0f * dpi;
9 public static float pixelToTwip(float input, float dpi) {
10 return (input / dpi) * 1440.0f;
13 public static float twipsToHMM(float twips) {
14 return (twips * 127 + 36) / 72;