public void TestStaticFn_IsUnit_iii ()
{
Single radius = 1;
Single pi; Maths.Pi(out pi);
for( Int32 i = 0; i <= 31; ++ i)
{
for( Int32 j = 0; j <= 31; ++ j)
{
Single theta = 2 * pi * i / 100;
Single phi = 2 * pi * j / 100;
Single x =
Maths.Cos(theta) *
Maths.Sin(phi) * radius;
Single y =
Maths.Sin(theta) *
Maths.Sin(phi) * radius;
Single z =
Maths.Cos(phi) * radius;
Assert.That(
new Vector3( x, y, z).IsUnit(),
Is.EqualTo(true));
}
}
}