JaciBrunning / Pathfinder

Cross-Platform, Multi-Use Motion Profiling and Trajectory Generation
MIT License
255 stars 78 forks source link

Add .equals and .fuzzyEquals to Waypoint and Config classes #33

Open SPCOxion opened 6 years ago

SPCOxion commented 6 years ago

Our team is currently using Pathfinder to pregenerate and save trajectories. In order to validate that two trajectories are the same, we also save the settings used in the Trajectory.Config and the Waypoint array used to generate a trajectory.

We found that, in Java, the built-in .equals function on a Trajectory.Config object will return false, even if all of the properties in each of the Config objects are equal. We weren't able to test this on waypoints, as we rounded the waypoints off at a certain decimal place; however, a .fuzzyEquals method for both classes would be helpful as well.

This is more of a feature request than a bug report.