diff options
author | Richard Linden <none@none> | 2012-02-01 13:03:46 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-02-01 13:03:46 -0800 |
commit | 5a14a67e060e7f325025e924c83489cfa236e3dc (patch) | |
tree | 2ba0a3d0c746a5f0322f9749e57920784e949ce6 /indra/llmath | |
parent | b3960899066156bc7d3fd5befb2f7e687a328152 (diff) |
converted a bunch of narrowing implicit conversions to explicit
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llcalcparser.h | 2 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 4 | ||||
-rw-r--r-- | indra/llmath/m4math.cpp | 38 |
3 files changed, 22 insertions, 22 deletions
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index bd9c8c2519..3509bd289b 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -174,7 +174,7 @@ private: F32 _log(const F32& a) const { return log(a); } F32 _exp(const F32& a) const { return exp(a); } F32 _fabs(const F32& a) const { return fabs(a); } - F32 _floor(const F32& a) const { return llfloor(a); } + F32 _floor(const F32& a) const { return (F3)llfloor(a); } F32 _ceil(const F32& a) const { return llceil(a); } F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 0c6cf1dfae..f08657a75c 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2903,7 +2903,7 @@ F32 LLVolume::sculptGetSurfaceArea() // compute the area of the quad by taking the length of the cross product of the two triangles LLVector3 cross1 = (p1 - p2) % (p1 - p3); LLVector3 cross2 = (p4 - p2) % (p4 - p3); - area += (cross1.magVec() + cross2.magVec()) / 2.0; + area += (cross1.magVec() + cross2.magVec()) / 2.f; } } @@ -5887,7 +5887,7 @@ F32 find_vertex_score(LLVCacheVertexData& data) } //bonus points for having low valence - F32 valence_boost = powf(data.mActiveTriangles, -FindVertexScore_ValenceBoostPower); + F32 valence_boost = powf((F32)data.mActiveTriangles, -FindVertexScore_ValenceBoostPower); score += FindVertexScore_ValenceBoostScale * valence_boost; return score; diff --git a/indra/llmath/m4math.cpp b/indra/llmath/m4math.cpp index bad4deb4de..6a1b4143cf 100644 --- a/indra/llmath/m4math.cpp +++ b/indra/llmath/m4math.cpp @@ -858,25 +858,25 @@ LLSD LLMatrix4::getValue() const void LLMatrix4::setValue(const LLSD& data) { - mMatrix[0][0] = data[0].asReal(); - mMatrix[0][1] = data[1].asReal(); - mMatrix[0][2] = data[2].asReal(); - mMatrix[0][3] = data[3].asReal(); - - mMatrix[1][0] = data[4].asReal(); - mMatrix[1][1] = data[5].asReal(); - mMatrix[1][2] = data[6].asReal(); - mMatrix[1][3] = data[7].asReal(); - - mMatrix[2][0] = data[8].asReal(); - mMatrix[2][1] = data[9].asReal(); - mMatrix[2][2] = data[10].asReal(); - mMatrix[2][3] = data[11].asReal(); - - mMatrix[3][0] = data[12].asReal(); - mMatrix[3][1] = data[13].asReal(); - mMatrix[3][2] = data[14].asReal(); - mMatrix[3][3] = data[15].asReal(); + mMatrix[0][0] = (F32)data[0].asReal(); + mMatrix[0][1] = (F32)data[1].asReal(); + mMatrix[0][2] = (F32)data[2].asReal(); + mMatrix[0][3] = (F32)data[3].asReal(); + + mMatrix[1][0] = (F32)data[4].asReal(); + mMatrix[1][1] = (F32)data[5].asReal(); + mMatrix[1][2] = (F32)data[6].asReal(); + mMatrix[1][3] = (F32)data[7].asReal(); + + mMatrix[2][0] = (F32)data[8].asReal(); + mMatrix[2][1] = (F32)data[9].asReal(); + mMatrix[2][2] = (F32)data[10].asReal(); + mMatrix[2][3] = (F32)data[11].asReal(); + + mMatrix[3][0] = (F32)data[12].asReal(); + mMatrix[3][1] = (F32)data[13].asReal(); + mMatrix[3][2] = (F32)data[14].asReal(); + mMatrix[3][3] = (F32)data[15].asReal(); } |