gef-classic
gef-classic copied to clipboard
Clean-up Deprecated API Usage
Several of the API elements marked as deprecated are used through out the GEF code base. As a first step for clean-up it would be good to replace this usage with the according replacement APIs.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 180 days since being marked as stale.
This will be a longer going effort. Therfore I reopen it it so that we have it as notification in the open issue list.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 180 days since being marked as stale.
While working through the different deprecated fields and methods in GEF Classic I came across Point::getDistance2. This method calculates the squared distance between to points. The deprecation comment their states that instead getDistance() should be used and if needed the results squared.
I checked the usage of getDistance2and it is mainly used to sort things according to distance. For this the getDistance2 has a much higher performance (sqrt, which is used in getDistance2is in general slow) and also a higher resolution. Therefore I don't think thisgetDistance2should be deprecated. If no one objects I would remove the deprecation from getDistance2and only change the return value from int to long. This is has no impact on the API and increases the utility.
Did I miss anything? Any opinion from @ptziegler, @Destrolaric, or @Phillipus?
I really don't like the method name, so because of that alone, I would keep it deprecated. What about creating a new method getDistanceSquared() and have getDistance2() simply delegate to it?
Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?
Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?
@l3002 we are happy for any support. Feel free to contribute.
Please see #383 for the breaking change caused by the last merge.
This issue is stale because it has been open for 90 days with no activity.
This issue is stale because it has been open for 90 days with no activity.
This issue is stale because it has been open for 90 days with no activity.