Added spin and anchor to various 2D shapes.

This commit is contained in:
Revar Desmera
2019-05-29 16:27:35 -07:00
parent c7d0be8ba5
commit 3b0a1a3383
4 changed files with 111 additions and 68 deletions

View File

@@ -53,9 +53,10 @@ function vabs(v) = [for (x=v) abs(x)];
// Function: normalize()
// Description:
// Returns unit length normalized version of vector v.
// If passed a zero-length vector, returns the unchanged vector.
// Arguments:
// v = The vector to normalize.
function normalize(v) = v/norm(v);
function normalize(v) = v==[0,0,0]? v : v/norm(v);
// Function: vquant()