pont-us / PuffinPlot

A program to plot and analyse palaeomagnetic data
GNU General Public License v3.0
3 stars 0 forks source link

Tighten up the Vec3 API #332

Open pont-us opened 3 years ago

pont-us commented 3 years ago

All methods in Vec3 should clearly state their contracts and enforce their preconditions (throwing exceptions where appropriate). It probably also makes sense to impose a class invariant that all components of all Vec3s must be finite; this can be enforced by checking the constructor arguments and making the class final (or giving it a private default constructor).