Timeline for Vector (physics) implementation
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Feb 12, 2019 at 15:56 | history | suggested | Punocchio | CC BY-SA 4.0 | Function 'public double distance' was closed with ] instead of }. |
| Feb 12, 2019 at 15:16 | review | Suggested edits | |||
| S Feb 12, 2019 at 15:56 | |||||
| Oct 29, 2014 at 9:22 | history | edited | Marco13 | CC BY-SA 3.0 | added 48 characters in body |
| Oct 29, 2014 at 9:20 | comment | added | Marco13 | @DavidZ You're right, that should have been "distance" (instead of "difference"), although the "distance" could simply stated to be the length of their difference - I'll edit this accordingly | |
| Oct 29, 2014 at 5:26 | comment | added | David Z | Little nitpick: the difference between two vectors is a perfectly well-defined (and very very useful) mathematical operation. | |
| Oct 28, 2014 at 9:29 | comment | added | Marco13 | @kevincline There are different trade-offs regarding performance, readability and flexibility (and admittedly, I already spent some time thinking about these trade-offs for the particular case of 2D/3D Point/Vector classes). There is a large design space between the most abstract solution of an interface Vec2D and an interface MutableVec2D on the one hand, and the most... "pragmatic" solution of class Vec2D { public double x,y; }. I tend to make things flexible (to be able to change the implementation later), but there's certainly no silver bullet here. | |
| Oct 27, 2014 at 21:46 | comment | added | Simon Forsberg | Welcome to Code Review! Nice answer, I hope you will feel at home here. | |
| Oct 27, 2014 at 21:26 | comment | added | kevin cline | If they are final (immutable), they don't necessarily need to be private and it may be very convenient if they are not. a.x is a lot more readable than a.getX(). | |
| Oct 27, 2014 at 21:04 | review | First posts | |||
| Oct 27, 2014 at 21:46 | |||||
| Oct 27, 2014 at 21:00 | history | answered | Marco13 | CC BY-SA 3.0 |