Skip to content

Commit 71c73ce

Browse files
cast to number inside of 2d and 3d creation
1 parent 5f474ea commit 71c73ce

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

extensions/ddededodediamante/Vectors.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,18 @@
237237
}
238238

239239
vector2D(args) {
240-
return new Float32Array([args.X, args.Y]);
240+
return new Float32Array([
241+
Scratch.Cast.toNumber(args.X),
242+
Scratch.Cast.toNumber(args.Y),
243+
]);
241244
}
242245

243246
vector3D(args) {
244-
return new Float32Array([args.X, args.Y, args.Z]);
247+
return new Float32Array([
248+
Scratch.Cast.toNumber(args.X),
249+
Scratch.Cast.toNumber(args.Y),
250+
Scratch.Cast.toNumber(args.Z),
251+
]);
245252
}
246253

247254
vectorFromAngle(args) {

0 commit comments

Comments
 (0)