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/angle.test.ts

19 lines
532 B

import { GeUtils } from "../../src/Geometry/GeUtils";
test("GeUtils.angle", () =>
{
let pi2 = Math.PI * 0.5;
let pi4 = pi2 * 0.5;
console.log(GeUtils.fixAngle(0.05, pi2, 0.1)/*?*/ == 0);
console.log(GeUtils.fixAngle(0.08, pi2, 0.1)/*?*/ == 0);
console.log(GeUtils.fixAngle(0.09, pi2, 0.1)/*?*/ == 0);
console.log(GeUtils.fixAngle(-0.05, pi2, 0.1)/*?*/ == Math.PI * 2);
console.log(GeUtils.fixAngle(Math.PI / 2 + 0.01, pi2, 0.1)/*?*/ == Math.PI / 2);
console.log(GeUtils.fixAngle(0.3, pi2));
})