pimathvector.h div and std::initializer_list
This commit is contained in:
@@ -40,7 +40,7 @@ PIMathVectorT3d PIQuaternion::eyler() const {
|
||||
angle_z = atan2(-rmat[0][1] / c, rmat[0][0] / c);
|
||||
}
|
||||
if (angle_z < 0) angle_z = 2*M_PI + angle_z;
|
||||
return createVectorT3d(angle_x,angle_y,angle_z);
|
||||
return PIMathVectorT3d({angle_x,angle_y,angle_z});
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ PIQuaternion PIQuaternion::fromAngles(double ax, double ay, double az) {
|
||||
}
|
||||
|
||||
PIQuaternion PIQuaternion::fromAngles2(double ax, double ay, double az) {
|
||||
double om = createVectorT3d(ax,ay,az).length();
|
||||
double om = PIMathVectorT3d({ax,ay,az}).length();
|
||||
if (om == 0.) return PIQuaternion(PIMathVectorT3d(), 1.);
|
||||
PIQuaternion res;
|
||||
res.q[0] = cos(om/2);
|
||||
|
||||
Reference in New Issue
Block a user