Created
December 2, 2018 04:44
-
-
Save wbbradley/2b50d9ac0e2c682e6b675f31b110ca9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module _ | |
type Vec has { | |
x float | |
y float | |
z float | |
} | |
fn main() { | |
var positions [int: Vec] | |
for i in range(10) { | |
positions[i] = Vec(float(i), float(i), float(i * 3)) | |
} | |
for (_, (_, _, z)) in positions { | |
print(z) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6.000000 | |
12.000000 | |
3.000000 | |
0.000000 | |
21.000000 | |
27.000000 | |
9.000000 | |
18.000000 | |
15.000000 | |
24.000000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment