public void Multiply_VectorScalar_Operator(double4 vec, double scale, double4 expected) { var actual = vec * scale; Assert.Equal(expected, actual); }
public void UnitX_IsUnit() { var expected = new double4(1, 0, 0, 0); Assert.Equal(expected, double4.UnitX); }
public void UnitW_IsUnit() { var expected = new double4(0, 0, 0, 1); Assert.Equal(expected, double4.UnitW); }
public void TransformPremult_4D_Static(double4x4 mat, double4 vec, double4 expected) { var actual = double4x4.TransformPremult(vec, mat); Assert.Equal(expected, -actual); }
public void TransformPremult_4D_Operator(double4x4 mat, double4 vec, double4 expected) { var actual = vec * mat; Assert.Equal(expected, -actual); }
public void Zero_IsZero() { var expected = new double4(0, 0, 0, 0); Assert.Equal(expected, double4.Zero); }
public void Transform_double4(double4 vec, QuaternionD quat, double4 expected) { var actual = QuaternionD.Transform(vec, quat); Assert.Equal(expected, actual); }
public void Min_IsZero(double4 left, double4 right, double4 expected) { var actual = double4.Min(left, right); Assert.Equal(expected, actual); }
public void Max_IsOne(double4 left, double4 right, double4 expected) { var actual = double4.Max(left, right); Assert.Equal(expected, actual); }
public void Multiply_VectorScalar_Static(double4 vec, double scale, double4 expected) { var actual = double4.Multiply(vec, scale); Assert.Equal(expected, actual); }
public void Divide_Vector_Scalar_Static(double4 vec, double scale, double4 expected) { var actual = double4.Divide(vec, scale); Assert.Equal(expected, actual); }
public void Subtract_Static(double4 left, double4 right, double4 expected) { var actual = double4.Subtract(left, right); Assert.Equal(expected, actual); }
public void Add_Static(double4 left, double4 right, double4 expected) { var actual = double4.Add(left, right); Assert.Equal(expected, actual); }
public void NormalizeFast_Instance(double4 vec, double4 expected) { var actual = vec.NormalizeFast(); Assert.Equal(expected, actual); }
public void Multiply_ScalarVector_Operator(double4 vec, double scale, double4 expected) { var actual = scale * vec; Assert.Equal(expected, actual); }
public void Clamp_TestClamp(double4 vec, double4 min, double4 max, double4 expected) { var actual = double4.Clamp(vec, min, max); Assert.Equal(expected, actual); }
public void Divide_Operator(double4 vec, double scale, double4 expected) { var actual = vec / scale; Assert.Equal(expected, actual); }
public void NormalizeFast_Static(double4 vec, double4 expected) { var actual = double4.NormalizeFast(vec); Assert.Equal(expected, actual); }
public void One_IsOne() { var expected = new double4(1, 1, 1, 1); Assert.Equal(expected, double4.One); }
public void Lerp_TestLerp(double4 left, double4 right, double blend, double4 expected) { var actual = double4.Lerp(left, right, blend); Assert.Equal(expected, actual); }
public void Transform_4D_Static(double4x4 mat, double4 vec, double4 expected) { var actual = double4x4.Transform(mat, vec); Assert.Equal(expected, actual); }
public void Barycentric_Edges(double4 a, double4 b, double4 c, double u, double v, double4 expected) { var actual = double4.BaryCentric(a, b, c, u, v); Assert.Equal(expected, actual); }
public void Transform_4D_Operator(double4x4 mat, double4 vec, double4 expected) { var actual = mat * vec; Assert.Equal(expected, actual); }
public void Subtract_Operator(double4 left, double4 right, double4 expected) { var actual = left - right; Assert.Equal(expected, actual); }
/// <summary> /// Constructs a new double3 from the given double4. /// </summary> /// <param name="v">The double4 to copy components from.</param> public double3(double4 v) { x = v.x; y = v.y; z = v.z; }
public double2(double4 v) { x = v.x; y = v.y; }