mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-29 03:40:17 +02:00
fix tests
This commit is contained in:
@@ -28,9 +28,12 @@ test_circle();
|
||||
|
||||
module test_rect() {
|
||||
assert_equal(rect(100,anchor=CENTER), [[50,-50],[-50,-50],[-50,50],[50,50]]);
|
||||
assert_equal(rect(100), [[100,0],[0,0],[0,100],[100,100]]);
|
||||
assert_equal(rect([100,80]), [[100,0],[0,0],[0,80],[100,80]]);
|
||||
assert_equal(rect(100), [[50,-50],[-50,-50],[-50,50],[50,50]]);
|
||||
assert_equal(rect(100,center=false), [[100,0],[0,0],[0,100],[100,100]]);
|
||||
assert_equal(rect([100,80],center=false), [[100,0],[0,0],[0,80],[100,80]]);
|
||||
assert_equal(rect([100,80],anchor=CENTER), [[50,-40],[-50,-40],[-50,40],[50,40]]);
|
||||
assert_equal(rect([100,80]), [[50,-40],[-50,-40],[-50,40],[50,40]]);
|
||||
assert_equal(rect([100,80],center=true), [[50,-40],[-50,-40],[-50,40],[50,40]]);
|
||||
assert_equal(rect([100,80],anchor=FRONT+LEFT), [[100,0],[0,0],[0,80],[100,80]]);
|
||||
assert_equal(rect([100,80],anchor=BACK+RIGHT), [[0,-80],[-100,-80],[-100,0],[0,0]]);
|
||||
assert_approx(rect([100,80],rounding=10,anchor=CENTER,$fn=12), [[50,-30],[48.6602540378,-35],[45,-38.6602540378],[40,-40],[-40,-40],[-45,-38.6602540378],[-48.6602540378,-35],[-50,-30],[-50,30],[-48.6602540378,35],[-45,38.6602540378],[-40,40],[40,40],[45,38.6602540378],[48.6602540378,35],[50,30]]);
|
||||
|
Reference in New Issue
Block a user