-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: 6
-
Component/s: client-libs
-
x86
-
windows_vista
A DESCRIPTION OF THE REQUEST :
Just a minor optimization of the darker method.
Each rgb component * FACTOR constant (is 0.7) is allways >=0
Is
public Color darker() {
return new Color(Math.max((int)(getRed() *FACTOR), 0),
Math.max((int)(getGreen()*FACTOR), 0),
Math.max((int)(getBlue() *FACTOR), 0));
}
Should be
public Color darker() {
return new Color((int)(getRed() *FACTOR),
(int)(getGreen()*FACTOR),
(int)(getBlue() *FACTOR));
}
JUSTIFICATION :
Speed
Just a minor optimization of the darker method.
Each rgb component * FACTOR constant (is 0.7) is allways >=0
Is
public Color darker() {
return new Color(Math.max((int)(getRed() *FACTOR), 0),
Math.max((int)(getGreen()*FACTOR), 0),
Math.max((int)(getBlue() *FACTOR), 0));
}
Should be
public Color darker() {
return new Color((int)(getRed() *FACTOR),
(int)(getGreen()*FACTOR),
(int)(getBlue() *FACTOR));
}
JUSTIFICATION :
Speed