public void IsPointOnLine_WhenGivenPointOnLine_ShouldReturnTrue() { var line = new[] { new Vector2(-5, 5), new Vector2(5, 5) }; var point = new Vector2(2.5F, 5); var onLine = helper.IsOnLine(point, line); Assert.True(onLine); }
private bool IsOnPolygonLine(Vector2[] aFace, Vector2[][] linePairs) { for (int i = 0; i < aFace.Length; i++) { for (int j = 0; j < linePairs.Length; j++) { if (helper.IsOnLine(aFace[i], linePairs[j])) { return(true); } } } return(false); }