コード例 #1
0
ファイル: MCircleTest.cs プロジェクト: Vectovox/MonoKle
 public void Contains_Outside()
 {
     MCircle c = new MCircle(MVector2.Zero, 32f);
     Assert.IsFalse(c.Contains(new MVector2(32f, 32f)));
     Assert.IsFalse(c.Contains(new MVector2(-32f, -32f)));
     Assert.IsFalse(c.Contains(new MVector2(32f, -32f)));
     Assert.IsFalse(c.Contains(new MVector2(-32f, 32f)));
 }
コード例 #2
0
ファイル: MCircleTest.cs プロジェクト: Vectovox/MonoKle
 public void Contains_Inside()
 {
     MCircle c = new MCircle(MVector2.Zero, 32f);
     Assert.IsTrue(c.Contains(MVector2.Zero));
     Assert.IsTrue(c.Contains(new MVector2(0, 32f)));
     Assert.IsTrue(c.Contains(new MVector2(0, -32f)));
     Assert.IsTrue(c.Contains(new MVector2(32f, 0)));
     Assert.IsTrue(c.Contains(new MVector2(-32f, 0)));
 }