summaryrefslogtreecommitdiff
path: root/core/math/quat.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/quat.h')
-rw-r--r--core/math/quat.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/core/math/quat.h b/core/math/quat.h
index c4f9b3a732..59a15f460b 100644
--- a/core/math/quat.h
+++ b/core/math/quat.h
@@ -115,20 +115,20 @@ public:
z = p_z;
w = p_w;
}
- inline Quat(real_t p_x, real_t p_y, real_t p_z, real_t p_w) {
- x = p_x;
- y = p_y;
- z = p_z;
- w = p_w;
+ inline Quat(real_t p_x, real_t p_y, real_t p_z, real_t p_w) :
+ x(p_x),
+ y(p_y),
+ z(p_z),
+ w(p_w) {
}
Quat(const Vector3 &axis, const real_t &angle) { set_axis_angle(axis, angle); }
Quat(const Vector3 &euler) { set_euler(euler); }
- Quat(const Quat &q) {
- x = q.x;
- y = q.y;
- z = q.z;
- w = q.w;
+ Quat(const Quat &q) :
+ x(q.x),
+ y(q.y),
+ z(q.z),
+ w(q.w) {
}
Quat(const Vector3 &v0, const Vector3 &v1) // shortest arc
@@ -153,9 +153,11 @@ public:
}
}
- inline Quat() {
- x = y = z = 0;
- w = 1;
+ inline Quat() :
+ x(0),
+ y(0),
+ z(0),
+ w(1) {
}
};