This commit is contained in:
2024-10-11 01:52:10 -04:00
parent 823a8f79d3
commit a663e45131
7 changed files with 96 additions and 76 deletions

View File

@@ -0,0 +1,18 @@
// for n points
translate :: (amount: Vec2s64, pn: ..*Vec2s64) {
for pn {
it.x += amount.x;
it.y += amount.y;
}
}
// for a triangle
translate :: (amount: Vec2s64, t: *Triangle) {
translate(amount, *t.p1, *t.p2, *t.p3);
}
// for a quad
translate :: (amount: Vec2s64, q: *Quad) {
translate(amount, *q.p1, *q.p2, *q.p3, *q.p4);
}