mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-03 13:02:41 +02:00
Fixed docs for path2d.
Modified pointlist_bounds to give output that matches input dimension and to work on any input dimension. Also made it ~20 times faster.
This commit is contained in:
@@ -613,6 +613,23 @@ module test_pointlist_bounds() {
|
||||
[23,57,-42]
|
||||
];
|
||||
assert(pointlist_bounds(pts) == [[-63,-32,-42], [84,97,42]]);
|
||||
pts2d = [
|
||||
[-53,12],
|
||||
[-63,36],
|
||||
[84,-5],
|
||||
[63,42],
|
||||
[23,-42]
|
||||
];
|
||||
assert(pointlist_bounds(pts2d) == [[-63,-42],[84,42]]);
|
||||
pts5d = [
|
||||
[-53,27,12,-53,12],
|
||||
[-63,97,36,-63,36],
|
||||
[84,-32,-5,84,-5],
|
||||
[63,-24,42,63,42],
|
||||
[23,57,-42,23,-42]
|
||||
];
|
||||
assert(pointlist_bounds(pts5d) == [[-63,-32,-42,-63,-42],[84,97,42,84,42]]);
|
||||
assert(pointlist_bounds([[3,4,5,6]]), [[3,4,5,6],[3,4,5,6]]);
|
||||
}
|
||||
test_pointlist_bounds();
|
||||
|
||||
|
Reference in New Issue
Block a user