MATH: Janitorial
This commit is contained in:
parent
29e4b87fdb
commit
78d4217ddb
14 changed files with 184 additions and 184 deletions
|
@ -32,7 +32,6 @@ Angle::Angle(float degrees) :
|
|||
|
||||
Angle::Angle(const Angle &a) :
|
||||
_degrees(a._degrees) {
|
||||
|
||||
}
|
||||
|
||||
Angle &Angle::normalize(float low) {
|
||||
|
|
|
@ -96,7 +96,6 @@ Common::StreamDebug &operator<<(Common::StreamDebug &dbg, const Math::Line2d &li
|
|||
|
||||
|
||||
Segment2d::Segment2d() {
|
||||
|
||||
}
|
||||
|
||||
Segment2d::Segment2d(const Vector2d &b, const Vector2d &e) :
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "math/vector2d.h"
|
||||
|
||||
#include "common/streamdebug.h"
|
||||
|
||||
namespace Math {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "common/streamdebug.h"
|
||||
|
||||
#include "math/vector3d.h"
|
||||
|
||||
namespace Math {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "common/streamdebug.h"
|
||||
|
||||
#include "math/vector3d.h"
|
||||
#include "math/vector4d.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue