Clamp shine parameter in range of 0..1
This commit is contained in:
parent
31f620d1bd
commit
e4cda1c751
@ -1,6 +1,7 @@
|
||||
package net.sf.openrocket.appearance;
|
||||
|
||||
import net.sf.openrocket.util.Color;
|
||||
import net.sf.openrocket.util.MathUtil;
|
||||
|
||||
/**
|
||||
* A component appearance.
|
||||
@ -17,13 +18,13 @@ public class Appearance {
|
||||
|
||||
Appearance(final Color paint, final double shine, final Decal texture) {
|
||||
this.paint = paint;
|
||||
this.shine = shine;
|
||||
this.shine = MathUtil.clamp(shine, 0, 1);
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
Appearance(final Color paint, final double shine) {
|
||||
this.paint = paint;
|
||||
this.shine = shine;
|
||||
this.shine = MathUtil.clamp(shine, 0, 1);
|
||||
this.texture = null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user