From 7f8c0d154c4296738288b0c871601710ec338822 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Thu, 16 Nov 2023 01:38:40 +0100 Subject: [PATCH] added rotate to structure --- src/lib/turtle/Structure.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/turtle/Structure.hx b/src/lib/turtle/Structure.hx index b47f7a6..74756ca 100644 --- a/src/lib/turtle/Structure.hx +++ b/src/lib/turtle/Structure.hx @@ -10,6 +10,10 @@ abstract Structure(Array) from Array { public inline function height():Int { return this.length; } + + public function rotate():Structure { + return [for (i in 0...height()) this[i].rotate()]; + } } abstract Layer(Array>) from Array> {