-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!
Description
https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5/Coordinates.cs could use a method to determine the distance from another point
for performance a DistanceSquared may be helpful too
something like:
public double DistanceSquared(Coordinates pt)
{
double dX = Math.Abs(X - pt.X);
double dY = Math.Abs(Y - pt.Y);
return dX * dX + dY * dY;
}
public double DistanceSquared(Coordinates pt)
{
return Math.Sqrt(DistanceSquared(pt));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!