Change the getB function, in src/core/pattern.js, to use the exponentiation operator

This commit is contained in:
Jonas Jenwald 2023-09-15 11:46:00 +02:00
parent 8d695c982f
commit 93ce7c5a89

View File

@ -418,12 +418,7 @@ const getB = (function getBClosure() {
const t = i / count, const t = i / count,
t_ = 1 - t; t_ = 1 - t;
lut.push( lut.push(
new Float32Array([ new Float32Array([t_ ** 3, 3 * t * t_ ** 2, 3 * t ** 2 * t_, t ** 3])
t_ * t_ * t_,
3 * t * t_ * t_,
3 * t * t * t_,
t * t * t,
])
); );
} }
return lut; return lut;