Do each of `p1` and `p2` of `fromSlope(p1, p2)` mean `[y, x]`? #1

Closed
kjirou opened this Issue Jan 5, 2017 · 1 comment

Projects

None yet

1 participant

@kjirou
kjirou commented Jan 5, 2017

Hello, I have a question.

First of all, fromSlope returns results like this:

> angles.fromSlope([0, 0], [1, 0])
0
> angles.fromSlope([0, 0], [1, 1])
45
> angles.fromSlope([0, 0], [0, 1])
90
> angles.fromSlope([0, 0], [-1, 1])
134.99999999999994
> angles.fromSlope([0, 0], [-1, 0])
180

From the above result, I imagine such a figure:

   [1,0]  [1,1]
     |    
     |    
[0,0]+----[0,1]
     |    
     |    
   [-1,0] [-1,1]

Finally, p1 indicates the start point and p2 indicates the end point.
Then, each is described as [y, x].

... I thought like this.

Is this understanding correct?

Thanks.

@kjirou
kjirou commented Jan 6, 2017

Sorry, I misunderstood.

@kjirou kjirou closed this Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment