public void SqrMagnitude2() { 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 = a.SqrMagnitude(); double valued = ad.SqrMagnitude(); Assert.True(Approximate(value, valued)); } }