Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11628 closed enhancement (fixed)

[Patch] Added documentation to EastNorth, changed x - y = y.sub(x) to x.subtract(y) and minor code style improvements.

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 15.08
Component: Core Version:
Keywords: gsoc Cc:

Description

An access to x is not much faster than a east()-method call, since the JIT can inline that access.

The current meaning of sub is to subtract from. I changed it to a normal subtract, which has the same meaning as in Point2D.

Attachments (1)

0002-Added-documentation-to-EastNorth-changed-x-y-y.sub-x.patch (9.4 KB ) - added by michael2402 10 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by michael2402, 10 years ago

Summary: Added documentation to EastNorth, changed x - y = y.sub(x) to x.subtract(y) and minor code style improvements.[Patch] Added documentation to EastNorth, changed x - y = y.sub(x) to x.subtract(y) and minor code style improvements.

comment:2 by Don-vip, 10 years ago

Keywords: gsoc added
Milestone: 15.07

comment:3 by bastiK, 10 years ago

Resolution: fixed
Status: newclosed

In 8549/josm:

applied #11628 - Added documentation to EastNorth, changed x - y = y.sub(x) to x.subtract(y) and minor code style improvements. (patch by michael2402, partially applied)

comment:4 by bastiK, 10 years ago

As stated in #11625, I find it simpler and more efficient to use the "inlined" formulas. (Just a matter of taste.)

Math.hypot is extremely slow and shouldn't be used in any code that could be relevant for performance.

comment:5 by Don-vip, 10 years ago

Milestone: 15.0715.08

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.