Skip to content

Commit

Permalink
Merge pull request #74 from dotariel/master
Browse files Browse the repository at this point in the history
Type declaration for Arc is incorrect
  • Loading branch information
alexbol99 committed Jan 15, 2021
2 parents 1ddd9a0 + 54e45ec commit 2fbaa9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ declare namespace Flatten {

const CCW = true;
const CW = false;
enum ArcOrientationType {CW, CCW}

class Arc {
counterClockwise: ArcOrientationType;
counterClockwise: boolean;

// members
ps: Point;
Expand All @@ -121,7 +120,7 @@ declare namespace Flatten {
r?: number,
startAngle?: number,
endAngle?: number,
counterClockwise?: ArcOrientationType
counterClockwise?: boolean
);

// getters
Expand Down Expand Up @@ -200,7 +199,7 @@ declare namespace Flatten {
// public methods
clone(): Circle;
contains(shape: Shape): boolean;
toArc(counterclockwise?: ArcOrientationType): Arc;
toArc(counterclockwise?: boolean): Arc;
intersect(shape: Shape): Array<Point>;
distanceTo(geom: Shape | PlanarSet): [number, Segment];
toJSON() : Object;
Expand Down Expand Up @@ -547,7 +546,7 @@ declare namespace Flatten {
function segment(ps?: Point, pe?: Point) : Segment;
function segment(arr: [number, number, number, number]) : Segment;
function segment(psx: number, psy: number, pex: number, pey: number) : Segment;
function arc(pc?: Point, r?: number, startAngle?: number, endAngle?: number, counterClockwise?: ArcOrientationType) : Arc;
function arc(pc?: Point, r?: number, startAngle?: number, endAngle?: number, counterClockwise?: boolean) : Arc;
function vector(x?: number, y?: number) : Vector;
function vector(arr: [number, number]) : Vector;
function vector(p1: Point, p2: Point) : Vector;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2fbaa9a

Please sign in to comment.