summaryrefslogtreecommitdiff
path: root/gnu/java/awt/color/SrgbConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/awt/color/SrgbConverter.java')
-rw-r--r--gnu/java/awt/color/SrgbConverter.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/gnu/java/awt/color/SrgbConverter.java b/gnu/java/awt/color/SrgbConverter.java
index a30a0db90..76831c0ea 100644
--- a/gnu/java/awt/color/SrgbConverter.java
+++ b/gnu/java/awt/color/SrgbConverter.java
@@ -107,15 +107,15 @@ public class SrgbConverter implements ColorSpaceConverter
float[] out = new float[3];
for (int i = 0; i < 3; i++)
{
- if (temp[i] < 0)
- temp[i] = 0.0f;
- if (temp[i] > 1)
- temp[i] = 1.0f;
- if (temp[i] <= 0.00304f)
- out[i] = temp[i] * 12.92f;
- else
- out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(temp[i])))
- - 0.055f;
+ if (temp[i] < 0)
+ temp[i] = 0.0f;
+ if (temp[i] > 1)
+ temp[i] = 1.0f;
+ if (temp[i] <= 0.00304f)
+ out[i] = temp[i] * 12.92f;
+ else
+ out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(temp[i])))
+ - 0.055f;
}
return out;
}
@@ -132,9 +132,9 @@ public class SrgbConverter implements ColorSpaceConverter
float[] out = new float[3];
for (int i = 0; i < 3; i++)
if (in[i] <= 0.03928f)
- temp[i] = in[i] / 12.92f;
+ temp[i] = in[i] / 12.92f;
else
- temp[i] = (float) Math.exp(2.4 * Math.log((in[i] + 0.055) / 1.055));
+ temp[i] = (float) Math.exp(2.4 * Math.log((in[i] + 0.055) / 1.055));
/*
* Note: The numbers which were used to calculate this only had four