public class UnitConv extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
UnitConv()
Utility class: Constructor prevents instantiating when subclassed.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
in2mm(double in)
Converts inches (in) to millimeters (mm)
|
static double |
mm2in(double mm)
Converts millimeters (mm) to inches (in)
|
static double |
mm2pt(double mm)
Converts millimeters (mm) to points (pt)
|
static int |
mm2px(double mm,
int resolution)
Converts millimeters (mm) to pixels (px)
|
static double |
pt2mm(double pt)
Converts points (pt) to millimeters (mm)
|
protected UnitConv()
public static double mm2pt(double mm)
mm - the value in mmpublic static double pt2mm(double pt)
pt - the value in ptpublic static double mm2in(double mm)
mm - the value in mmpublic static double in2mm(double in)
in - the value in inchespublic static int mm2px(double mm,
int resolution)
mm - the value in mmresolution - the resolution in dpi (dots per inch)Copyright © 2003–2023. All rights reserved.