Commit Graph

40 Commits

Author SHA1 Message Date
Luke Street 6547f76752 Remove error-causing constexprs 2022-05-31 20:17:23 -04:00
Phillip Stephens fc33e18b4a
constexpr fixes 2022-03-12 09:03:27 -08:00
Phillip Stephens e9c0fe7a6e
Remove athena types 2022-02-27 20:46:10 -08:00
Phillip Stephens 9130bf977e
Add IsNan helper function to CVector3f 2021-05-16 15:29:06 -07:00
Luke Street 566db657d9 Add NEON support & more constexpr 2020-10-20 02:25:44 -04:00
Luke Street 58c8a902ac CVector3f/CVector2f: Fix isZero 2020-09-16 00:41:47 -04:00
Lioncash 5520001117 General: Mark file-scope constexpr variables as inline
Allows the compiler to unify all usages of these constants down to a
single address if they're ODR used, rather than creating an individual
copy within each translation unit.

Unfortunately all file-scope variables don't have inline implied for
them by default (only for static class member variables).

Shrinks the size of the emitted binary a little bit.
2020-04-19 03:22:13 -04:00
Lioncash 81f9b4a4ee General: Mark functions as nodiscard where applicable
Given this aims to be a general purpose math library for use in various
other libraries applications for axiodl, we can annotate functions that
return by value or reference with [[nodiscard]] where it's very obvious
that not making use of the return value is a bug.

This allows the compiler to diagnose and emit warnings for these API
misuses at compile-time, preventing silent bugs from occurring.

Any cases where not using the return value is desirable may still be
casted to void in order to silence warnings.
2020-03-04 03:07:54 -05:00
Phillip Stephens 82c2a2d85b
Minor fixes 2020-03-03 16:47:59 -08:00
Lioncash f6854d8e82 General: Mark member functions as const where applicable
These don't modify internal member state, so they can be const.
2019-09-01 21:53:57 -04:00
Lioncash dafc850598 zeus: Amend inclusions
Trims out unused headers and ensures the necessary includes are
included.
2019-09-01 04:30:53 -04:00
Jack Andersen b854e76dc9 constexpr refactor 2019-02-23 21:15:32 -10:00
Jack Andersen 2041ec3156 More flexible conversion constructior from CVector2f->CVector3f 2019-02-10 10:58:27 -10:00
Jack Andersen 7df9f9b7ec Correct CVector3f::slerp implementation 2018-12-12 21:36:29 -10:00
Jack Andersen e172225845 New code style refactor 2018-12-07 19:23:50 -10:00
Jack Andersen e8dfecbb6e SIMD refactor 2018-12-07 15:16:50 -10:00
Jack Andersen 18afb32077 Use reciprocal-multiplication for vector-scalar division 2018-11-02 22:44:52 -10:00
Jack Andersen 20603da60d Convert to pragma once 2018-10-06 17:39:40 -10:00
Jack Andersen 17a501f339 Remove unneeded standard math functions 2018-06-02 20:10:58 -10:00
Jack Andersen e94de160ad Add unaligned vector load constructor 2018-05-09 21:22:37 -10:00
Jack Andersen 34d13c15c1 Linux build fix 2018-04-02 14:44:30 -10:00
Jack Andersen ca54d1b54d Add CVector3f::isMagnitudeSafe() 2018-03-03 18:25:21 -10:00
Jack Andersen 527b503bd7 Make vectors and quaternions implicitly convertible to athena vectors 2018-02-23 20:16:08 -10:00
Jack Andersen 692dc1adfb Add AVX intrinsics for CVector3d 2017-12-18 17:02:59 -10:00
Jack Andersen 9ab271cd04 Make vector float constructors `explicit` 2017-12-17 16:54:05 -10:00
Jack Andersen 50f47d6455 Remove SSE4 runtime checks 2017-12-15 15:32:06 -10:00
Jack Andersen bad3038132 Add operator[] asserts 2017-11-23 22:21:18 -10:00
Phillip Stephens b94b2cdd02 Fix `CVector3f::canBeNormalized` 2017-11-18 01:17:40 -08:00
cylgom 92290663a9 Squashed commit of the following:
commit 7ee57f731293285cf6506549e651a338670fb953
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 21:57:13 2017 +0200

    fixed commits indentation

commit 5b948329ba66d64c569b4067b50be5c9593d316b
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 20:39:45 2017 +0200

    moved CQuaternion ctor out of athena-dependant compiler directives

commit 7d9bb58ba28b5fc4d43e1ff87a843dc4ae42d048
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 20:30:43 2017 +0200

    added required headers in CTransform.hpp

commit da0d9ef76b23eaf233a5c3a58a6c1219b80d7c71
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 20:28:46 2017 +0200

    moved CVector3f ctor out of athena-dependant compiler directives

commit e08199c749dfd1762afd4b75f2f871bd5a86907b
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 20:12:43 2017 +0200

    fixed const inline arrays

commit 7084b6af2107ec390011f82a14424b8f0142f354
Author: cylgom <cylgom@gmail.com>
Date:   Thu Jun 8 20:11:09 2017 +0200

    fixed empty flags replacement in CMakeLists

fixed unreachable ctors and missing includes
2017-06-08 22:01:41 +02:00
Jack Andersen 8603353cf7 Added skZero for other vector types 2017-03-17 13:30:14 -10:00
Jack Andersen f1e3db1c50 CVector3d improvements 2017-03-13 21:02:09 -10:00
Jack Andersen 69627f4bf3 Make vector constants class-scope 2017-02-11 17:48:21 -10:00
Phillip Stephens e7a72d02b1 Add CAABox::booleanIntersection 2017-01-20 21:57:34 -08:00
Phillip Stephens 0a7c192dd5 CQuaternion::lookAt imp 2016-09-16 15:20:12 -07:00
Jack Andersen 7aa5ccf0c7 Invert logic on CAABox::intersects 2016-08-13 09:35:41 -10:00
Jack Andersen b15e66a710 Bulk-run of clang-format 2016-07-08 08:42:42 -10:00
Phillip Stephens ac98ebf428 Various fixes and implementations 2016-04-26 03:36:44 -07:00
Jack Andersen ac44f808ce Add static stream reader for vector 2016-04-24 19:03:05 -10:00
Jack Andersen 33c357ecc6 ZE_ATHENA_TYPES readers are now explicit-endian 2016-03-13 14:57:31 -10:00
Jack Andersen a76d43d5df Humungous refactor 2016-03-04 13:03:26 -10:00