On Mon, Feb 14, 2011 at 22:09, Martin Kinkelin <[email protected]> wrote:
> So from the outside, components are accessed either via indexing or > via x,y,z and w (analog to HLSL/GLSL). I also added some downcasting > shortcuts via properties, e.g.: > > auto f4 = float4(1,2,3,4); > auto r = f4.xyz + 2.0; // downcast f4 to float3 w/o copying, add double > assert(r == double3(3,4,5)); // element type of r is double :) We had some discussions on swizzling here, in the past. It makes for a nice use of opDispatch(string s).
