X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.common%2Fsrc%2Forg%2Fsimantics%2Fcommon%2Futils%2FCommonUtils.java;h=7402ed9651f95ffc9e0ed1d2689461e6e403d17a;hb=27cae6bcf184f7e27822886f5a7320f771913b71;hp=53b0d7a50376f7a16f5db749324aca7ac9e162aa;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.common/src/org/simantics/common/utils/CommonUtils.java b/bundles/org.simantics.common/src/org/simantics/common/utils/CommonUtils.java index 53b0d7a50..7402ed965 100644 --- a/bundles/org.simantics.common/src/org/simantics/common/utils/CommonUtils.java +++ b/bundles/org.simantics.common/src/org/simantics/common/utils/CommonUtils.java @@ -1,15 +1,15 @@ -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); - } - -} +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); + } + +}