[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: no Point2D.setLocation(x,y)?
From:       Kevin Rushforth <kevin.rushforth () oracle ! com>
Date:       2015-07-30 13:06:55
Message-ID: 55BA216F.4000102 () oracle ! com
[Download RAW message or body]

We can add new API if there is a good reason and sufficient benefit to 
justify the effort, including the effort of writing additional tests 
(both unit test and functional tests). Since API is "forever" we are 
more careful about adding new API than, say, making a functionally 
compatible performance optimization, but we can consider it.

You can file an enhancement request at:

http://bugs.java.com/

Thank you.

-- Kevin


Sam Howman wrote:
> Some other comments about this class (and Point3D):
> * In calculating the magnitude (and distance): Math.sqrt(a * a + b * b)
> could be replaced with Math.hypot(a,b) to get the advantage of avoiding
> intermediate underflow and overflow
> * distanceSquared functions are faster for doing comparisons of distances
> (avoid two square roots).
> * Adding a method crossProductMagnitude would allow the angle compuations
> to be done with a single line:
>
> Math.atan2(crossProductMagnitude(A,B), dotProduct(A,B));
>
> Is it possible/likely that at the workings of such a class be ammended
> in these ways? Who decides?
>   
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic