Skip to content
Permalink
Browse files

SimpleShadingAlgorithm: fix byte limit

  • Loading branch information
devemux86 committed Nov 10, 2019
1 parent b3e2b28 commit 390e5f7e7e14103f9c70e78c31ce129b105b1cb1
@@ -70,7 +70,7 @@ private static short readNext(ByteBuffer din, short fallback) throws IOException
*/
protected double exaggerate(double in) {
double x = in * scale;
x = Math.max(-128d, Math.min(128d, x));
x = Math.max(-128d, Math.min(127d, x));
double ret = (Math.sin(0.5d * Math.PI * Math.sin(0.5d * Math.PI * Math.sin(0.5d * Math.PI * x / 128d))) * 128 * (1d - linearity) + x * linearity);
return ret;
}

0 comments on commit 390e5f7

Please sign in to comment.
You can’t perform that action at this time.