private void PackHelper(float x, float y, float z, float w) { X = HalfUtils.Pack(x); Y = HalfUtils.Pack(y); Z = HalfUtils.Pack(z); W = HalfUtils.Pack(w); }
/// <summary> /// Initializes a new instance of the HalfVector4 class. /// </summary> /// <param name="x">Initial value for the x component.</param><param name="y">Initial value for the y component.</param><param name="z">Initial value for the z component.</param><param name="w">Initial value for the w component.</param> public HalfVector4(float x, float y, float z, float w) : this( HalfUtils.Pack(x), HalfUtils.Pack(y), HalfUtils.Pack(z), HalfUtils.Pack(w)) { }
/// <summary> /// Initializes a new instance of the HalfVector3 class. /// </summary> /// <param name="x">Initial value for the x component.</param><param name="y">Initial value for the y component.</param><param name="z">Initial value for the z component.</param><param name="w">Initial value for the w component.</param> public HalfVector3(float x, float y, float z) { X = HalfUtils.Pack(x); Y = HalfUtils.Pack(y); Z = HalfUtils.Pack(z); }
private static uint PackHelper(float vectorX, float vectorY) { return((uint)HalfUtils.Pack(vectorX) | (uint)HalfUtils.Pack(vectorY) << 16); }
private static ulong PackHelper(float vectorX, float vectorY, float vectorZ, float vectorW) { return((ulong)HalfUtils.Pack(vectorX) | (ulong)HalfUtils.Pack(vectorY) << 16 | (ulong)HalfUtils.Pack(vectorZ) << 32 | (ulong)HalfUtils.Pack(vectorW) << 48); }
public HalfVector3(float x, float y, float z) { this.X = HalfUtils.Pack(x); this.Y = HalfUtils.Pack(y); this.Z = HalfUtils.Pack(z); }