diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 15:12:12 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 15:12:12 +0000 |
| commit | 7d1944ab9d2307f2736afe8520436872db1c7617 (patch) | |
| tree | 7380a4f148f9ce0b70ed9f02cfa5e8561c783a7a /examples/features/composition.zc | |
| parent | 8b720543f538862796fec0ff6b7ea12cb140bf0f (diff) | |
'let' it be
Diffstat (limited to 'examples/features/composition.zc')
| -rw-r--r-- | examples/features/composition.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/features/composition.zc b/examples/features/composition.zc index 883c348..64fb8e0 100644 --- a/examples/features/composition.zc +++ b/examples/features/composition.zc @@ -21,11 +21,11 @@ struct Rigidbody { fn main() { // Mixin usage - flattened fields - var t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; + let t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; println "Transform pos: ({t.x}, {t.y})"; // Named usage - nested fields - var rb = Rigidbody{ + let rb = Rigidbody{ position: Vector2{x: 0.0, y: 10.0}, velocity: Vector2{x: 1.0, y: 0.0}, mass: 50.0 |
