Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/mikktspace/mikktspace.c')
-rw-r--r--intern/mikktspace/mikktspace.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index fcfd5edca8d..c05ada84773 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -243,7 +243,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
int iNrActiveGroups = 0, index = 0;
const int iNrFaces = pContext->m_pInterface->m_getNumFaces(pContext);
tbool bRes = TFALSE;
- const float fThresCos = (const float) cos((fAngularThreshold*M_PI)/180);
+ const float fThresCos = (const float) cos((fAngularThreshold*(float)M_PI)/180.0f);
// verify all call-backs have been set
if( pContext->m_pInterface->m_getNumFaces==NULL ||
@@ -282,7 +282,6 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
// Mark all degenerate triangles
iTotTris = iNrTrianglesIn;
- iNrTrianglesIn = 0;
iDegenTriangles = 0;
for(t=0; t<iTotTris; t++)
{
@@ -436,9 +435,9 @@ typedef struct
const int g_iCells = 2048;
#ifdef _MSC_VER
-#define NOINLINE __declspec(noinline)
+ #define NOINLINE __declspec(noinline)
#else
-#define NOINLINE __attribute__ ((noinline))
+ #define NOINLINE __attribute__ ((noinline))
#endif
// it is IMPORTANT that this function is called to evaluate the hash since
@@ -446,9 +445,9 @@ const int g_iCells = 2048;
// results for the same effective input value fVal.
NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
{
-const float fIndex = g_iCells * ((fVal-fMin)/(fMax-fMin));
-const int iIndex = fIndex<0?0:((int)fIndex);
-return iIndex<g_iCells?iIndex:(g_iCells-1);
+ const float fIndex = g_iCells * ((fVal-fMin)/(fMax-fMin));
+ const int iIndex = fIndex<0?0:((int)fIndex);
+ return iIndex<g_iCells?iIndex:(g_iCells-1);
}
void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
@@ -646,7 +645,7 @@ void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikk
int iL=iL_in, iR=iR_in;
assert((iR_in-iL_in)>0); // at least 2 entries
- // seperate (by fSep) all points between iL_in and iR_in in pTmpVert[]
+ // separate (by fSep) all points between iL_in and iR_in in pTmpVert[]
while(iL < iR)
{
tbool bReadyLeftSwap = TFALSE, bReadyRightSwap = TFALSE;