javascript(ultra32): clone
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
2ecbd6d4b4
commit
676e541926
|
@ -42,3 +42,10 @@ function rotate(vector) {
|
||||||
return vector;
|
return vector;
|
||||||
}
|
}
|
||||||
exports.rotate = rotate;
|
exports.rotate = rotate;
|
||||||
|
function clone(vector) {
|
||||||
|
const newVec = new Float32Array(vector.length);
|
||||||
|
for (let i = 0; i < vector.length; i++) {
|
||||||
|
newVec[i] = vector[i];
|
||||||
|
}
|
||||||
|
return newVec;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue