Skip to content

Instantly share code, notes, and snippets.

@wbbradley
Created December 2, 2018 04:44
Show Gist options
  • Save wbbradley/2b50d9ac0e2c682e6b675f31b110ca9b to your computer and use it in GitHub Desktop.
Save wbbradley/2b50d9ac0e2c682e6b675f31b110ca9b to your computer and use it in GitHub Desktop.
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)
}
}
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