Vladimír Vondruš
deb54fc92f
GCC 4.6 compatibility: no inheriting constructors in Math::Vector.
13 years ago
Vladimír Vondruš
0e34eeda58
GCC 4.6 compatibility: no delegating constructors in Math::BoolVector.
13 years ago
Vladimír Vondruš
2cdb159cbd
GCC 4.6 compatibility: no user-defined literals.
13 years ago
Vladimír Vondruš
6a90b0231b
Math: using new aliases for builtin types in whole Math namespace.
13 years ago
Vladimír Vondruš
5ff0e29950
Math: fix warning about literal types in normalize().
...
C++11 changed type of character literal (i.e. '\x7F') from int to char,
thus the documentation is wrong (also mistakenly used octal literal).
Added test to properly test the behavior.
13 years ago
Vladimír Vondruš
14460cf0f4
Math: renamed *::matrix() to ::toMatrix().
...
It better visualizes the fact that neither (Dual)Complex nor
(Dual)Quaternion contains the matrix inside them, but performs (possibly
costly) conversion.
13 years ago
Vladimír Vondruš
a0af6856c7
Math: transforming points with DualComplex.
13 years ago
Vladimír Vondruš
268c07acc5
Math: converting DualComplex to matrix.
13 years ago
Vladimír Vondruš
8e562316e8
Math: creating DualComplex from Vector2.
13 years ago
Vladimír Vondruš
7aac5bd70b
Math: no need for Complex::transformVectorNormalized().
...
Unlike quaternions it doesn't need inversion or normalization for
transforming vectors.
13 years ago
Vladimír Vondruš
90f5a006c4
Math: reworked DualComplex to actually work.
...
The tests now pass and it works similarly to transformation matrix
multiplication/inversion in 2D, but it hasn't any connection to dual
numbers anymore.
13 years ago
Vladimír Vondruš
8ff9118275
Math: test DualComplex transformation combination.
...
Also fails.
13 years ago
Vladimír Vondruš
5e2f8db651
Math: test also that DualComplex transformations are normalized.
...
Fails for translation.
13 years ago
Vladimír Vondruš
c019dc7781
Math: test that transformation (dual) complex/quat is normalized.
13 years ago
Vladimír Vondruš
bdc02ddd19
Math: translation dual complex number.
13 years ago
Vladimír Vondruš
1a5e18564e
Math: rotation dual complex number.
13 years ago
Vladimír Vondruš
fbac6662fa
Math: inversion of DualComplex.
13 years ago
Vladimír Vondruš
d7bfd91398
Math: length and normalization of DualComplex.
13 years ago
Vladimír Vondruš
f6d1a158f8
Math: initial implementation of dual complex numbers.
13 years ago
Vladimír Vondruš
e522293c22
Math: forgot to test DualQuaternion::invertedNormalized().
13 years ago
Vladimír Vondruš
c847e1551f
Math: "dot product" of Complex is real number.
...
Brain failure #2 . Also I don't know if such thing as dot product exists
here :-)
13 years ago
Vladimír Vondruš
1eea843538
Math: don't allow implicit conversion of T to Complex<T>.
...
Brain failure #1 .
13 years ago
Vladimír Vondruš
6edc26ff01
Math: more explicit Quaternion-from-Vector constructor test.
...
For better readability, nothing more.
13 years ago
Vladimír Vondruš
6ed315b79b
Math: properly test constexpr in Complex from Vector2 constructor.
13 years ago
Vladimír Vondruš
b0d79bbad8
Math: minor code cleanup.
13 years ago
Vladimír Vondruš
fab0aa1544
Math: expect fail on non-uniform scaling in Matrix*::rotation().
...
Not implemented yet, added TODO.
13 years ago
Vladimír Vondruš
d59b620fd9
Math: transforming vectors with complex numbers.
13 years ago
Vladimír Vondruš
93952cd72a
Math: converting Vector2 to Complex and back.
13 years ago
Vladimír Vondruš
8aade86571
Math: converting complex number to rotation matrix.
13 years ago
Vladimír Vondruš
e7ceddf0fc
Math: rotation complex number.
13 years ago
Vladimír Vondruš
4ebd204482
Math: angle between two complex numbers.
...
Also crosslinked the documentation with similar functions in Vector and
Quaternion.
13 years ago
Vladimír Vondruš
fc8750c51f
Math: conjugation and inversion of complex numbers.
...
Also updated related Quaternion and DualQuaternion documentation.
13 years ago
Vladimír Vondruš
728b9a3f2e
Math: construct identity transformation by default.
...
Square matrices already had that, (dual) quaternions too, making that
the default also with complex numbers. Updated the documentation to
reflect that.
13 years ago
Vladimír Vondruš
dc5a19f952
Math: complex number dot product, length and normalization.
13 years ago
Vladimír Vondruš
b509ff02ea
Math: complex number multiplication.
13 years ago
Vladimír Vondruš
4ad85dceca
Math: fixed debug output operator for Deg and Rad.
...
It was currently not possible to print this, as the resulting type is
neither Deg nor Rad:
Debug() << 23.0_degf - 5.0_degf;
13 years ago
Vladimír Vondruš
9464e805e1
Use {} instead of "".
...
Calls default std::string constructor instead of converting from const
char*, might possibly save unneeded allocation.
13 years ago
Vladimír Vondruš
9dbd8c9356
Math: renamed Quaternion::rotateVector*() to transformVector*().
...
Now it is consistent with Matrix and can be easily used in templates.
13 years ago
Vladimír Vondruš
58d156bc47
Math: removed Point2D/Point3D altogether.
13 years ago
Vladimír Vondruš
c2f4359bd7
Math: added strongly-typed asin(), acos() and atan().
13 years ago
Vladimír Vondruš
3cbeb43078
Cleaned up includes.
13 years ago
Vladimír Vondruš
c0a5e5dadd
Math: added sin(), cos() and tan() accepting either Rad or Deg.
13 years ago
Vladimír Vondruš
3ccc6a794e
Math: removed old deg()/rad() helpers.
13 years ago
Vladimír Vondruš
c293630c7c
Math: using Rad for Quaternion and DualQuaternion functions.
13 years ago
Vladimír Vondruš
d16a6259b8
Math: using Rad for Matrix4::perspectiveProjection().
...
Also updated dependent functions and tests.
13 years ago
Vladimír Vondruš
830ce69da0
Math: using Rad in Matrix*::rotation*().
...
Also updated dependent functions and tests.
13 years ago
Vladimír Vondruš
1d40254676
Math: use Rad for Vector::angle().
13 years ago
Vladimír Vondruš
ff929c04e9
Math: type-safe implementation for degrees and radians.
...
Next few commits will add requirement for "strongly typed" angles in all
function parameters, e.g.:
Matrix3::rotation(24.0_degf);
Math::sin(1.047_radf);
The purpose is to make angle entering less error-prone, e.g. not passing
degrees when radians should be etc.
13 years ago
Vladimír Vondruš
f1e3453517
Math: base class for units.
13 years ago
Vladimír Vondruš
687bd37b81
Math: initial complex number implementation.
13 years ago