Skip to content

Commit

Permalink
Rename getPerpendicularLeftVector in rotate90DegreesAntiClockwise
Browse files Browse the repository at this point in the history
  • Loading branch information
yishn committed Oct 3, 2020
1 parent 1b35de4 commit 11e4076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/GridArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {arrSubtract, arrEquals, arrScale, arrAdd} from '../helper'
import {
norm,
normalize,
getPerpendicularLeftVector,
rotate90DegreesAntiClockwise,
getRectCenteredAround,
getRectSegmentIntersections
} from '../geometry'
Expand Down Expand Up @@ -85,7 +85,7 @@ export default class GridArrow extends Component {
m,
arrScale(
(length * Math.tan((-(nextProps.bend || 0) * Math.PI) / 180)) / 2,
normalize(getPerpendicularLeftVector(d))
normalize(rotate90DegreesAntiClockwise(d))
)
)

Expand Down
2 changes: 1 addition & 1 deletion src/geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function getRectSegmentIntersections(rect, p1, p2) {
.filter(p => insideRect(rect, p))
}

export function getPerpendicularLeftVector([x, y]) {
export function rotate90DegreesAntiClockwise([x, y]) {
return [-y, x]
}

Expand Down

0 comments on commit 11e4076

Please sign in to comment.