[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46730] trunk/blender/source/blender/ compositor/operations/COM_ScreenLensDistortionOperation.cpp: Fix for MSVC float conversion

Jeroen Bakker j.bakker at atmind.nl
Thu May 17 15:25:41 CEST 2012


Revision: 46730
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46730
Author:   jbakker
Date:     2012-05-17 13:25:41 +0000 (Thu, 17 May 2012)
Log Message:
-----------
Fix for MSVC float conversion

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp

Modified: trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp	2012-05-17 13:22:19 UTC (rev 46729)
+++ trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp	2012-05-17 13:25:41 UTC (rev 46730)
@@ -93,7 +93,7 @@
 		{
 			// RG
 			const int dx = ln[2] - ln[0], dy = ln[3] - ln[1];
-			const float dsf = sqrtf(dx*dx + dy*dy) + 1.f;
+			const float dsf = sqrtf((float)dx*dx + dy*dy) + 1.f;
 			const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf);
 			const float sd = 1.f/(float)ds;
 
@@ -111,7 +111,7 @@
 		{
 			// GB
 			const int dx = ln[4] - ln[2], dy = ln[5] - ln[3];
-			const float dsf = sqrtf(dx*dx + dy*dy) + 1.f;
+			const float dsf = sqrtf((float)dx*dx + dy*dy) + 1.f;
 			const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf);
 			const float sd = 1.f/(float)ds;
 




More information about the Bf-blender-cvs mailing list