You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/__test__/Geometry/Vector3Ext.test.ts

15 lines
498 B

7 years ago
import { GeUtils } from '../../src/Geometry/GeUtils';
import * as THREE from "three";
7 years ago
import { Vector3 } from 'three';
test("测试平行", () =>
{
7 years ago
let v1 = new Vector3(0, 0, 1);
let v2 = new Vector3(0.0001, 0, 1);
expect(GeUtils.isParallelTo(v1, v2)).toBe(false);
expect(v1.equals(new THREE.Vector3(0, 0, 1))).toBe(true);
expect(v2.equals(new THREE.Vector3(0.0001, 0, 1))).toBe(true);
// console.log(v1.isParallelTo(v2));
// console.log(v1);
// console.log(v2);
})