Re: Implementing vector swizzle.

2013-12-12 Thread evilrat
On Friday, 13 December 2013 at 00:53:17 UTC, TheFlyingFiddle wrote: I would like to be able to do this. auto vector = vec4(1,2,3,4); vector.zxy += vec3(4,4,4); I'm currently able to do this: vector.zxy = vec3(4,4,4); Assigns 4 to the x,y and z components. and this auto other = vector.zxy;

Implementing vector swizzle.

2013-12-12 Thread TheFlyingFiddle
I would like to be able to do this. auto vector = vec4(1,2,3,4); vector.zxy += vec3(4,4,4); I'm currently able to do this: vector.zxy = vec3(4,4,4); Assigns 4 to the x,y and z components. and this auto other = vector.zxy; other is a vector3 with other.x == vector.z other.y == vector.x othe