| 1 |
|
| 2 |
static if (__traits(compiles, __vector(float[4]))) |
| 3 |
{ |
| 4 |
struct vfloat |
| 5 |
{ |
| 6 |
public: |
| 7 |
__vector(float[4]) f32; |
| 8 |
|
| 9 |
this(float X) nothrow |
| 10 |
{ |
| 11 |
f32.ptr[0] = X; |
| 12 |
f32.ptr[1] = X; |
| 13 |
f32.ptr[2] = X; |
| 14 |
f32.ptr[3] = X; |
| 15 |
} |
| 16 |
this(float X, float Y, float Z, float W) nothrow |
| 17 |
{ |
| 18 |
f32.array[0] = X; |
| 19 |
f32.array[1] = Y; |
| 20 |
f32.array[2] = Z; |
| 21 |
f32.array[3] = W; |
| 22 |
} |
| 23 |
this(float[4] values) nothrow |
| 24 |
{ |
| 25 |
f32.array = values; |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
immutable GvfGlobal_ThreeA = vfloat(3.0f); |
| 30 |
immutable GvfGlobal_ThreeB = vfloat(3.0f, 3.0f, 3.0f, 3.0f); |
| 31 |
immutable GvfGlobal_ThreeC = vfloat([3.0f, 3.0f, 3.0f, 3.0f]); |
| 32 |
} |