X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fmath%2Fmatrix3.cpp;h=acb274f554f0e2cfa9d30fa73621a2c5b7e019cf;hb=646f736e77b085c86e982c0d1d4b895c2a431330;hp=3273a31fb827495f55525179c7383b3319115ce0;hpb=14a7ce57b6b0a71869185a5218d59180f60ef892;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/math/matrix3.cpp b/dali/public-api/math/matrix3.cpp index 3273a31..acb274f 100644 --- a/dali/public-api/math/matrix3.cpp +++ b/dali/public-api/math/matrix3.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -36,9 +36,9 @@ #define S22 8 /* - * S00 S01 S02 - * S10 S11 S12 - * S20 S21 S22 + * S00 S10 S20 + * S01 S11 S21 + * S02 S12 S22 */ namespace @@ -136,8 +136,8 @@ bool Matrix3::Invert() // In the case where the determinant is exactly zero, the matrix is non-invertible if( ! EqualsZero( det ) ) { - det = 1.0 / det; - for (int i = 0; i < 9; i++) + det = 1.0f / det; + for( int32_t i = 0; i < 9; i++ ) { mElements[i] = cof[i] * det; } @@ -237,11 +237,11 @@ void Matrix3::Multiply( Matrix3& result, const Matrix3& lhs, const Matrix3& rhs const float* rhsPtr = rhs.AsFloat(); const float* lhsPtr = lhs.AsFloat(); - for( int i=0; i < 3; i++ ) + for( int32_t i=0; i < 3; i++ ) { - int loc = i * 3; - int loc1 = loc + 1; - int loc2 = loc + 2; + int32_t loc = i * 3; + int32_t loc1 = loc + 1; + int32_t loc2 = loc + 2; float value0 = lhsPtr[loc]; float value1 = lhsPtr[loc1]; @@ -281,9 +281,9 @@ bool Matrix3::operator!=(const Matrix3& rhs) const std::ostream& operator<< (std::ostream& o, const Matrix3& matrix) { - return o << "[ [" << matrix.mElements[0] << ", " << matrix.mElements[1] << ", " << matrix.mElements[2] << "], " - << "[" << matrix.mElements[3] << ", " << matrix.mElements[4] << ", " << matrix.mElements[5] << "], " - << "[" << matrix.mElements[6] << ", " << matrix.mElements[7] << ", " << matrix.mElements[8] << "] ]"; + return o << "[ " << matrix.mElements[0] << ", " << matrix.mElements[1] << ", " << matrix.mElements[2] << ", " + << matrix.mElements[3] << ", " << matrix.mElements[4] << ", " << matrix.mElements[5] << ", " + << matrix.mElements[6] << ", " << matrix.mElements[7] << ", " << matrix.mElements[8] << " ]"; } } // namespace Dali