mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-31 10:11:53 +02:00
refactor: vector minus
This commit is contained in:
@@ -2,12 +2,9 @@ use <__comm__/__in_line.scad>;
|
|||||||
|
|
||||||
function _in_shape_in_line_equation(edge, pt) =
|
function _in_shape_in_line_equation(edge, pt) =
|
||||||
let(
|
let(
|
||||||
x1 = edge[0].x,
|
v = edge[1] - edge[0],
|
||||||
y1 = edge[0].y,
|
a = v.y / v.x,
|
||||||
x2 = edge[1].x,
|
b = edge[0].y - a * edge[0].x
|
||||||
y2 = edge[1].y,
|
|
||||||
a = (y2 - y1) / (x2 - x1),
|
|
||||||
b = y1 - a * x1
|
|
||||||
)
|
)
|
||||||
(pt.y == a * pt.x + b);
|
(pt.y == a * pt.x + b);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user