MATH: Janitorial

This commit is contained in:
Paweł Kołodziejski 2022-06-20 00:19:40 +02:00
parent 29e4b87fdb
commit 78d4217ddb
No known key found for this signature in database
GPG key ID: 0BDADC9E74440FF7
14 changed files with 184 additions and 184 deletions

View file

@ -32,7 +32,6 @@ Angle::Angle(float degrees) :
Angle::Angle(const Angle &a) :
_degrees(a._degrees) {
}
Angle &Angle::normalize(float low) {

View file

@ -96,7 +96,6 @@ Common::StreamDebug &operator<<(Common::StreamDebug &dbg, const Math::Line2d &li
Segment2d::Segment2d() {
}
Segment2d::Segment2d(const Vector2d &b, const Vector2d &e) :

View file

@ -97,8 +97,7 @@ void Matrix<4, 4>::translate(const Vector3d &vec) {
* http://clb.confined.space/MathGeoLib/nightly/docs/float3x3_LookAt.php
*/
void Matrix<4, 4>::buildFromTargetDir(const Math::Vector3d &modelForward, const Math::Vector3d &targetDirection,
const Math::Vector3d &modelUp, const Math::Vector3d &worldUp)
{
const Math::Vector3d &modelUp, const Math::Vector3d &worldUp) {
Matrix3 rotation;
rotation.buildFromTargetDir(modelForward, targetDirection, modelUp, worldUp);
this->setRotation(rotation);
@ -115,7 +114,7 @@ void Matrix<4, 4>::invertAffineOrthonormal() {
setPosition(position);
}
void swap (float &a, float &b);
void swap(float &a, float &b);
void Matrix<4, 4>::transpose() {
swap(operator ()(0,1), operator ()(1,0));

View file

@ -82,10 +82,10 @@ public:
for (int i = 0; i < 16; i += 4) {
for (int j = 0; j < 4; ++j) {
r[i + j] = (d1[i + 0] * d2[j + 0])
+ (d1[i + 1] * d2[j + 4])
+ (d1[i + 2] * d2[j + 8])
+ (d1[i + 3] * d2[j + 12]);
r[i + j] = (d1[i + 0] * d2[j + 0]) +
(d1[i + 1] * d2[j + 4]) +
(d1[i + 2] * d2[j + 8]) +
(d1[i + 3] * d2[j + 12]);
}
}

View file

@ -20,6 +20,7 @@
*/
#include "math/vector2d.h"
#include "common/streamdebug.h"
namespace Math {

View file

@ -20,6 +20,7 @@
*/
#include "common/streamdebug.h"
#include "math/vector3d.h"
namespace Math {

View file

@ -20,6 +20,7 @@
*/
#include "common/streamdebug.h"
#include "math/vector3d.h"
#include "math/vector4d.h"