Mercurial > projects > ldc
annotate tests/mini/union3.d @ 1651:cb960b882ca3 tip
bindings were moved to dsource.org/projects/bindings/
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Thu, 20 May 2010 20:05:03 +0200 |
parents | 44f08170f4ef |
children |
rev | line source |
---|---|
lindquist@73 | 1 module union3; |
lindquist@73 | 2 |
lindquist@73 | 3 union vec3 |
lindquist@73 | 4 { |
lindquist@73 | 5 struct { float x,y,z; } |
lindquist@73 | 6 float[3] xyz; |
lindquist@73 | 7 } |
lindquist@73 | 8 |
lindquist@73 | 9 void main() |
lindquist@73 | 10 { |
lindquist@73 | 11 vec3 v; |
lindquist@73 | 12 assert(&v.y is &v.xyz[1]); |
lindquist@73 | 13 } |