You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2016/10/13 16:52:10 UTC
svn commit: r1764734 -
/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
Author: desruisseaux
Date: Thu Oct 13 16:52:10 2016
New Revision: 1764734
URL: http://svn.apache.org/viewvc?rev=1764734&view=rev
Log:
Some additional pre-defined units of measurement.
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1764734&r1=1764733&r2=1764734&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Thu Oct 13 16:52:10 2016
@@ -62,8 +62,11 @@ public final class Units extends Static
* @see #CENTIMETRE
* @see #KILOMETRE
* @see #NAUTICAL_MILE
+ * @see #MILE
* @see #FOOT
* @see #FOOT_SURVEY_US
+ * @see #INCH
+ * @see #PIXEL
*
* @since 0.8
*/
@@ -121,12 +124,24 @@ public final class Units extends Static
*
* @see #METRE
* @see #KILOMETRE
+ * @see #MILE
*
* @since 0.8
*/
public static final Unit<Length> NAUTICAL_MILE = METRE.multiply(1852);
/**
+ * Unit of measurement defined as 1609.344 metres.
+ *
+ * @see #METRE
+ * @see #KILOMETRE
+ * @see #NAUTICAL_MILE
+ *
+ * @since 0.8
+ */
+ public static final Unit<Length> MILE = METRE.multiply(1609.344);
+
+ /**
* Unit of measurement defined as 0.3048 metres.
*
* @see #METRE
@@ -148,6 +163,21 @@ public final class Units extends Static
public static final Unit<Length> FOOT_SURVEY_US = METRE.multiply(12 / 39.37);
/**
+ * Unit of measurement defined as 2.54 centimetres.
+ *
+ * @since 0.8
+ */
+ public static final Unit<Length> INCH = METRE.multiply(2.54 / 100);
+
+ /**
+ * Unit of measurement defined as 0.013837 inch.
+ * This is commonly used to measure the height of a font.
+ *
+ * @since 0.8
+ */
+ public static final Unit<Length> POINT = METRE.multiply(0.996264 / 72);
+
+ /**
* The SI unit for plane angles.
* There is 2\u03c0 radians in a circle.
*