BigUglySpider / EmuLibs

Selection of libraries designed to be used with Emu projects. This was originally a Math library only, but has since been changed to hold all Emu libraries to enable consistency in changes to dependencies (such as EmuCore modifications).
https://biguglyspider.github.io/math
0 stars 0 forks source link

Vector update #29

Closed BigUglySpider closed 2 years ago

BigUglySpider commented 2 years ago

Rewritten Vector template and removed old system due to its bad dependencies.

New Vector implementation is more useable, offers better customisation and has matching (and in some cases better due to direct-construction mutations) performance compared to the old scalar implementation.

Also implemented normals to planes and projection onto another vector/plane, unlike the old implementation.

Construction is less temperamental and makes use of std::enable_if_t to better identify if constructions are possible.

Vectors of references are now significantly easier to form, allowing T& syntax when instantiating a template.

Some additional helpers have been provided, such as EmuMath::make_vector<T> which may be used to form a Vector containing Ts, with a size equal to the number of provided arguments.

A lot of additional EmuCore helpers have been implemented to help out, such as with offset index sequences.

Significantly more DRY code compared to the old implementation; a very significant amount of functionalities has been implemented via the generic mutation functionality.

Also comes with the start of the new Matrix, although it is not especially useable as a Matrix just yet.