Added in range step of 1 to avoid errors.

This commit is contained in:
Revar Desmera
2019-05-26 22:34:46 -07:00
parent 44ed576e07
commit f378b70151
23 changed files with 171 additions and 171 deletions

View File

@@ -28,7 +28,7 @@ function is_vector(v) = is_list(v) && is_num(v[0]);
// v2 = The second vector.
// Example:
// vmul([3,4,5], [8,7,6]); // Returns [24, 28, 30]
function vmul(v1, v2) = [for (i = [0:len(v1)-1]) v1[i]*v2[i]];
function vmul(v1, v2) = [for (i = [0:1:len(v1)-1]) v1[i]*v2[i]];
// Function: vdiv()
@@ -40,7 +40,7 @@ function vmul(v1, v2) = [for (i = [0:len(v1)-1]) v1[i]*v2[i]];
// v2 = The second vector.
// Example:
// vdiv([24,28,30], [8,7,6]); // Returns [3, 4, 5]
function vdiv(v1, v2) = [for (i = [0:len(v1)-1]) v1[i]/v2[i]];
function vdiv(v1, v2) = [for (i = [0:1:len(v1)-1]) v1[i]/v2[i]];
// Function: vabs()