code cleanup a bit

This commit is contained in:
Yotam Mann 2014-07-02 23:38:20 -04:00
parent 63f264ad6f
commit 343ab3dee4

View file

@ -41,14 +41,12 @@ define(["Tone/core/Tone", "Tone/signal/Threshold"], function(Tone){
var curveLength = 1024; var curveLength = 1024;
var curve = new Float32Array(curveLength); var curve = new Float32Array(curveLength);
for (var i = 0; i < curveLength; i++){ for (var i = 0; i < curveLength; i++){
var normalized = (i / (curveLength)); var normalized = (i / (curveLength)) * 2 - 1;
var val; if (normalized === 0){
if (normalized === 0.5){ curve[i] = 1;
val = 1;
} else { } else {
val = 0; curve[i] = 0;
} }
curve[i] = val;
} }
this._equals.curve = curve; this._equals.curve = curve;
}; };