fix line slope equation for mirror plugin.
This commit is contained in:
parent
673743faae
commit
16f63eaf2e
1 changed files with 5 additions and 4 deletions
|
@ -1,10 +1,11 @@
|
|||
import { name, version } from '../package.json'
|
||||
|
||||
export const lineValues = (start, end) => {
|
||||
const { x: x1, y: y1 } = end
|
||||
const { x: x2, y: y2 } = start
|
||||
const c = x1 * y2 - x2 * y1
|
||||
return [-(x1 - x2), y1 - y2, c]
|
||||
const { x: x1, y: y1 } = start
|
||||
const { x: x2, y: y2 } = end
|
||||
const [A, B] = [-(y2 - y1), x2 - x1]
|
||||
const C = -(A * x1 + B * y1)
|
||||
return [A, B, C]
|
||||
}
|
||||
|
||||
export const mirrorGen = (start, end) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue