mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-12 01:34:12 +02:00
update doc
This commit is contained in:
41
docs/lib-in_polyline.md
Normal file
41
docs/lib-in_polyline.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# in_polyline
|
||||
|
||||
Checks wether a point is on a line.
|
||||
|
||||
**Since:** 1.3
|
||||
|
||||
## Parameters
|
||||
|
||||
- `line_pts` : The line points.
|
||||
- `pt` : The point to be checked.
|
||||
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
|
||||
|
||||
## Examples
|
||||
|
||||
include <in_polyline.scad>;
|
||||
|
||||
pts = [
|
||||
[0, 0],
|
||||
[10, 0],
|
||||
[10, 10]
|
||||
];
|
||||
|
||||
echo(in_polyline(pts, [-2, -3])); // false
|
||||
echo(in_polyline(pts, [5, 0])); // true
|
||||
echo(in_polyline(pts, [10, 5])); // true
|
||||
echo(in_polyline(pts, [10, 15])); // false
|
||||
|
||||
----
|
||||
|
||||
include <in_polyline.scad>;
|
||||
|
||||
pts = [
|
||||
[10, 0, 10],
|
||||
[20, 0, 10],
|
||||
[20, 10, 10]
|
||||
];
|
||||
|
||||
echo(in_polyline(pts, [10, 0, 10])); // true
|
||||
echo(in_polyline(pts, [15, 0, 10])); // true
|
||||
echo(in_polyline(pts, [15, 1, 10])); // false
|
||||
echo(in_polyline(pts, [20, 11, 10])); // false
|
@@ -1,26 +0,0 @@
|
||||
# in_polyline2d
|
||||
|
||||
Checks wether a point is on a line.
|
||||
|
||||
**Since:** 1.3
|
||||
|
||||
## Parameters
|
||||
|
||||
- `line_pts` : The line points.
|
||||
- `pt` : The point to be checked.
|
||||
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
|
||||
|
||||
## Examples
|
||||
|
||||
include <in_polyline2d.scad>;
|
||||
|
||||
pts = [
|
||||
[0, 0],
|
||||
[10, 0],
|
||||
[10, 10]
|
||||
];
|
||||
|
||||
echo(in_polyline2d(pts, [-2, -3])); // false
|
||||
echo(in_polyline2d(pts, [5, 0])); // true
|
||||
echo(in_polyline2d(pts, [10, 5])); // true
|
||||
echo(in_polyline2d(pts, [10, 15])); // false
|
Reference in New Issue
Block a user