/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Default Constructor
*/
Quaternion::Quaternion()
- : mVector( 0.0f, 0.0f, 0.0f, 1.0f )
+: mVector( 0.0f, 0.0f, 0.0f, 1.0f )
{
}
-Quaternion::Quaternion( float cosThetaBy2, float iBySineTheta, float jBySineTheta, float kBySineTheta ) :
- mVector( iBySineTheta, jBySineTheta, kBySineTheta, cosThetaBy2 )
+Quaternion::Quaternion( float cosThetaBy2, float iBySineTheta, float jBySineTheta, float kBySineTheta )
+: mVector( iBySineTheta, jBySineTheta, kBySineTheta, cosThetaBy2 )
{
}
Quaternion::Quaternion( const Vector4& vector )
+: mVector( vector )
{
- mVector = vector;
}
Quaternion::Quaternion( Radian angle, const Vector3& axis )
float Quaternion::Length() const
{
- return (float)sqrt(mVector.w * mVector.w + mVector.Dot(mVector));
+ return static_cast< float >( sqrt(mVector.w * mVector.w + mVector.Dot(mVector) ) );
}
float Quaternion::LengthSquared() const
{
- return (float)(mVector.w * mVector.w + mVector.Dot(mVector));
+ return static_cast< float >( mVector.w * mVector.w + mVector.Dot(mVector) );
}
void Quaternion::Normalize()
}
} // namespace Dali
-