Various bugfixes found by docs regen.

This commit is contained in:
Revar Desmera
2020-04-26 04:29:21 -07:00
parent 2834e8bc56
commit e32735296c
6 changed files with 16 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ function vceil(v) = [for (x=v) ceil(x)];
// unit([0,0,10]); // Returns: [0,0,1]
// unit([0,-10,0]); // Returns: [0,-1,0]
// unit([0,0,0]); // Returns: [0,0,0]
function unit(v) = norm(v)<=EPSILON? v : v/norm(v);
function unit(v) = assert(is_vector(v),str(v)) norm(v)<=EPSILON? v : v/norm(v);
// Function: vector_angle()