-package org.simantics.common.utils;\r
-\r
-public class CommonUtils {\r
-\r
- public static double convertColor256ToDouble(int value) {\r
- // TODO: how close to 256 can we go? \r
- return (1/255.9999)*((double)value);\r
- }\r
- \r
- public static int convertDoubleToColor256(double value) {\r
- // TODO: how close to 256 can we go? \r
- return (int)(255.9999*value);\r
- }\r
- \r
-}\r
+package org.simantics.common.utils;
+
+public class CommonUtils {
+
+ public static double convertColor256ToDouble(int value) {
+ // TODO: how close to 256 can we go?
+ return (1/255.9999)*((double)value);
+ }
+
+ public static int convertDoubleToColor256(double value) {
+ // TODO: how close to 256 can we go?
+ return (int)(255.9999*value);
+ }
+
+}