UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

19 lines (18 loc) 389 B
"use strict"; import { NamedFunction2, NamedFunction3 } from "./_Base"; export class crossVector2 extends NamedFunction2 { static type() { return "crossVector2"; } func(v1, v2) { return v1.cross(v2); } } export class crossVector3 extends NamedFunction3 { static type() { return "crossVector3"; } func(v1, v2, target) { return target.copy(v1).cross(v2); } }