This commit is contained in:
Đăng Nguyễn
2025-10-24 10:24:59 +07:00
parent ab5d3e1a1a
commit a01f140f2e
62 changed files with 762 additions and 326 deletions

View File

@@ -102,4 +102,9 @@ public static class MathExtensions
if (dotProduct / (lengthAB * lengthBC) < -1) return 180;
return Math.Acos(dotProduct / (lengthAB * lengthBC)) * (180.0 / Math.PI);
}
public static double Distance(double x1, double y1, double x2, double y2)
{
return Math.Sqrt(Math.Pow(x2 - x1, 2) + Math.Pow(y2 - y1, 2));
}
}