1
0
Fork 0

fix line slope equation for mirror plugin.

This commit is contained in:
Patrick Forringer 2020-05-30 10:11:09 -05:00
parent 673743faae
commit 16f63eaf2e

View file

@ -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) => {