public void Magnitude1() { for (int i = 0; i < count; i++) { float ax, ay, az, aw; ax = UnityEngine.Random.Range(-10F, 10F); ay = UnityEngine.Random.Range(-10F, 10F); az = UnityEngine.Random.Range(-10F, 10F); aw = UnityEngine.Random.Range(-10F, 10F); Vector4 a = new Vector4(ax, ay, az, aw); Vector4d ad = new Vector4d(ax, ay, az, aw); float value = Vector4.Magnitude(a); double valued = Vector4d.Magnitude(ad); Assert.True(Approximate(value, valued)); } }