usage message fixes and doc tweaks

remove triangle area, optimize polygon_area for triangles
This commit is contained in:
Adrian Mariano
2022-04-08 19:37:46 -04:00
parent cca4fad3ef
commit 82aa485045
14 changed files with 904 additions and 847 deletions

View File

@@ -43,7 +43,7 @@
// is_vector([1,1,1],all_nonzero=false); // Returns true
// is_vector([],zero=false); // Returns false
function is_vector(v, length, zero, all_nonzero=false, eps=EPSILON) =
is_list(v) && len(v)>0 && []==[for(vi=v) if(!is_num(vi)) 0]
is_list(v) && len(v)>0 && []==[for(vi=v) if(!is_finite(vi)) 0]
&& (is_undef(length) || len(v)==length)
&& (is_undef(zero) || ((norm(v) >= eps) == !zero))
&& (!all_nonzero || all_nonzero(v)) ;