Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by michael2402

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 Changed 4 years ago by Don-vip

Keywords: gsoc added
Milestone: 15.07

comment:3 Changed 4 years ago by bastiK

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 Changed 4 years ago by bastiK

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 Changed 4 years ago by Don-vip

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.