mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-31 03:50:27 +02:00
add test
This commit is contained in:
@@ -72,9 +72,10 @@ include <util/test_dedup.scad>;
|
||||
include <util/test_zip.scad>;
|
||||
include <util/test_some.scad>;
|
||||
include <util/test_every.scad>;
|
||||
include <util/test_shuffle.scad>;
|
||||
include <util/test_spherical_coordinate.scad>;
|
||||
include <util/set/test_hashset.scad>;
|
||||
include <util/map/test_hashmap.scad>;
|
||||
include <util/test_shuffle.scad>;
|
||||
|
||||
// Voxel
|
||||
include <voxel/test_vx_line.scad>;
|
||||
|
13
test/util/test_spherical_coordinate.scad
Normal file
13
test/util/test_spherical_coordinate.scad
Normal file
@@ -0,0 +1,13 @@
|
||||
use <unittest.scad>;
|
||||
use <util/spherical_coordinate.scad>;
|
||||
|
||||
module test_spherical_coordinate() {
|
||||
echo("==== test_spherical_coordinate ====");
|
||||
coord = spherical_coordinate([100, 100, 100]);
|
||||
r = round(coord[0]);
|
||||
theta = round(coord[1]);
|
||||
phi = round(coord[2]);
|
||||
assert([r, theta, phi] == [173, 45, 55]);
|
||||
}
|
||||
|
||||
test_spherical_coordinate();
|
Reference in New Issue
Block a user