コード例 #1
0
ファイル: Tools.cs プロジェクト: neko-org/AngelSuite
 /// <summary>
 /// Finds the distance between this entity and a point on a 2D surface.
 /// </summary>
 /// <param name="location1">this</param>
 /// <param name="x2">The point on the x-axis.</param>
 /// <param name="y2">The point on the y-axis.</param>
 /// <returns>Distance</returns>
 public static double Distance2D(this ILocation2D location1, float x2, float y2)
 {
     return(Distance2D(location1.X, location1.Y, x2, y2));
 }
コード例 #2
0
ファイル: Tools.cs プロジェクト: neko-org/AngelSuite
 /// <summary>
 /// Finds the distance between this entity and another entity on a 2D surface.
 /// </summary>
 /// <param name="location1">this</param>
 /// <param name="location2">Entity.</param>
 /// <returns>Distance</returns>
 public static double Distance2D(this ILocation2D location1, ILocation2D location2)
 {
     return(Distance2D(location1.X, location1.Y, location2.X, location2.Y));
 }
コード例 #3
0
ファイル: Tools.cs プロジェクト: neko-org/AngelSuite
 public static ILocation2D RotateAroundPoint2D(this ILocation2D location, double radians, ILocation2D origin)
 {
     return(RotateAroundPoint2D(location.X, location.Y, radians, origin.X, origin.Y));
 }
コード例 #4
0
ファイル: Tools.cs プロジェクト: neko-org/AngelSuite
 public static ILocation2D RotateAroundPoint2D(this ILocation2D location, double radians, float xOrigin, float yOrigin)
 {
     return(RotateAroundPoint2D(location.X, location.Y, radians, xOrigin, yOrigin));
 }
コード例 #5
0
ファイル: Tools.cs プロジェクト: neko-org/AngelSuite
 /////////
 public static ILocation2D RotateAroundOrigin2D(this ILocation2D location, double radians)
 {
     return(RotateAroundOrigin2D(location.X, location.Y, radians));
 }
コード例 #6
0
ファイル: Tools.cs プロジェクト: BryanHurst/ZombieTools
 /// <summary>
 /// Finds the distance between this entity and another entity on a 2D surface.
 /// </summary>
 /// <param name="location1">this</param>
 /// <param name="location2">Entity.</param>
 /// <returns>Distance</returns>
 public static double Distance2D(this ILocation2D location1, ILocation2D location2)
 {
     return Distance2D(location1.X, location1.Y, location2.X, location2.Y);
 }