Re[2]: Area#add(Area) Optimization

2022-02-17 Thread Jeremy Wood
OK, thanks for the feedback. Regards, - Jeremy -- Original Message -- From: "Philip Race" To: "Jeremy Wood" ; [email protected] Sent: 2/12/2022 5:26:37 PM Subject: Re: Area#add(Area) Optimization I suppose this could be added but it is something

Re: Area#add(Area) Optimization

2022-02-12 Thread Philip Race
I suppose this could be added but it is something an application also can easily do for itself. >     curves = rhs.curves; The straight reference, rather than a copy surprised me, but I suppose (I am not familiar with the working of the Area class) that all mutations must create a new Vector

Area#add(Area) Optimization

2022-02-11 Thread Jeremy Wood
I’m working a lot with the Area class lately. Is there any interest in the following optimization? Area#add(Area) currently resembles: public void add(Area rhs) { curves = new AreaOp.AddOp().calculate(this.curves, rhs.curves); invalidateBounds(); } I propose replacing it with: public void