Пример #1
0
 public void Test_FaceXYZtoUVW()
 {
     for (int face = 0; face < 6; ++face)
     {
         Assert.Equal(new S2Point(0, 0, 0), S2.FaceXYZtoUVW(face, S2Point.Empty));
         Assert.Equal(new S2Point(1, 0, 0), S2.FaceXYZtoUVW(face, S2.GetUAxis(face)));
         Assert.Equal(new S2Point(-1, 0, 0), S2.FaceXYZtoUVW(face, -S2.GetUAxis(face)));
         Assert.Equal(new S2Point(0, 1, 0), S2.FaceXYZtoUVW(face, S2.GetVAxis(face)));
         Assert.Equal(new S2Point(0, -1, 0), S2.FaceXYZtoUVW(face, -S2.GetVAxis(face)));
         Assert.Equal(new S2Point(0, 0, 1), S2.FaceXYZtoUVW(face, S2.GetNorm(face)));
         Assert.Equal(new S2Point(0, 0, -1), S2.FaceXYZtoUVW(face, -S2.GetNorm(face)));
     }
 }