From f86cc6549ff6075c3963fce819391d8d8d6960dc Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 8 Sep 2024 19:33:49 -0400 Subject: Bugfixes --- examples/vectors.tm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/vectors.tm b/examples/vectors.tm index 9f0ef20d..8560f9df 100644 --- a/examples/vectors.tm +++ b/examples/vectors.tm @@ -27,10 +27,10 @@ struct Vec2(x,y:Num): return v len := v:length() return Vec2(v.x/len, v.y/len) - func mix(v,other:Vec2, amount:Num)->Vec2: + func mix(a,b:Vec2, amount:Num)->Vec2: return Vec2( - v.x:mix(other.x, amount), - v.y:mix(other.y, amount), + amount:mix(a.x, b.x), + amount:mix(a.y, b.y), ) struct Vec3(x,y,z:Num): @@ -58,11 +58,11 @@ struct Vec3(x,y,z:Num): return v len := v:length() return Vec3(v.x/len, v.y/len, v.z/len) - func mix(v,other:Vec3, amount:Num)->Vec3: + func mix(a,b:Vec3, amount:Num)->Vec3: return Vec3( - v.x:mix(other.x, amount), - v.y:mix(other.y, amount), - v.z:mix(other.z, amount), + amount:mix(a.x, b.x), + amount:mix(a.y, b.y), + amount:mix(a.z, b.z), ) -- cgit v1.2.3