Skip to content

Commit

Permalink
refactor(geom-arc): update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 10, 2021
1 parent ec7199d commit 71cd8c3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
18 changes: 7 additions & 11 deletions packages/geom-arc/src/bounds.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { HALF_PI, inRange, roundTo } from "@thi.ng/math";
import {
MAX2,
max2,
MIN2,
min2,
ReadonlyVec,
set2,
Vec,
VecPair,
} from "@thi.ng/vectors";
import { HALF_PI } from "@thi.ng/math/api";
import { inRange } from "@thi.ng/math/interval";
import { roundTo } from "@thi.ng/math/prec";
import { MAX2, MIN2, ReadonlyVec, Vec, VecPair } from "@thi.ng/vectors/api";
import { max2 } from "@thi.ng/vectors/max";
import { min2 } from "@thi.ng/vectors/min";
import { set2 } from "@thi.ng/vectors/set";
import { pointAtTheta } from "./point-at";

export const bounds = (
Expand Down
6 changes: 4 additions & 2 deletions packages/geom-arc/src/closest-point.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fit01, minError } from "@thi.ng/math";
import { distSq2, ReadonlyVec, Vec } from "@thi.ng/vectors";
import { fit01 } from "@thi.ng/math/fit";
import { minError } from "@thi.ng/math/min-error";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
import { distSq2 } from "@thi.ng/vectors/distsq";
import { pointAtTheta } from "./point-at";

export const closestPoint = (
Expand Down
26 changes: 11 additions & 15 deletions packages/geom-arc/src/from-endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { EPS, TAU } from "@thi.ng/math";
import {
abs2,
angleBetween2,
div2,
eqDelta2,
mulN2,
neg,
powN2,
ReadonlyVec,
sub2,
submN2,
Vec,
X2,
} from "@thi.ng/vectors";
import { EPS, TAU } from "@thi.ng/math/api";
import { abs2 } from "@thi.ng/vectors/abs";
import { angleBetween2 } from "@thi.ng/vectors/angle-between";
import { ReadonlyVec, Vec, X2 } from "@thi.ng/vectors/api";
import { div2 } from "@thi.ng/vectors/div";
import { eqDelta2 } from "@thi.ng/vectors/eqdelta";
import { mulN2 } from "@thi.ng/vectors/muln";
import { neg } from "@thi.ng/vectors/neg";
import { powN2 } from "@thi.ng/vectors/pown";
import { sub2 } from "@thi.ng/vectors/sub";
import { submN2 } from "@thi.ng/vectors/submn";

/**
* Conversion from endpoint to center parameterization.
Expand Down
8 changes: 6 additions & 2 deletions packages/geom-arc/src/point-at.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { cossin, fit01 } from "@thi.ng/math";
import { add2, mul2, ReadonlyVec, rotateZ, Vec } from "@thi.ng/vectors";
import { cossin } from "@thi.ng/math/angle";
import { fit01 } from "@thi.ng/math/fit";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
import { add2 } from "@thi.ng/vectors/add";
import { mul2 } from "@thi.ng/vectors/mul";
import { rotateZ } from "@thi.ng/vectors/rotate";

export const pointAt = (
pos: ReadonlyVec,
Expand Down
12 changes: 7 additions & 5 deletions packages/geom-arc/src/sample.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { isNumber, isPlainObject } from "@thi.ng/checks";
import { DEFAULT_SAMPLES, SamplingOpts } from "@thi.ng/geom-api";
import { Sampler } from "@thi.ng/geom-resample";
import { TAU } from "@thi.ng/math";
import { cartesian2, ReadonlyVec, Vec } from "@thi.ng/vectors";
import { isNumber } from "@thi.ng/checks/is-number";
import { isPlainObject } from "@thi.ng/checks/is-plain-object";
import { DEFAULT_SAMPLES, SamplingOpts } from "@thi.ng/geom-api/sample";
import { Sampler } from "@thi.ng/geom-resample/sampler";
import { TAU } from "@thi.ng/math/api";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
import { cartesian2 } from "@thi.ng/vectors/cartesian";
import { pointAtTheta } from "./point-at";

export const sample = (
Expand Down

0 comments on commit 71cd8c3

Please sign in to comment.