[Bf-blender-cvs] [7d69a4f] soc-2016-uv_tools: Small optimization to last commit (thx nexyon for the hint)

Phil Gosch noreply at git.blender.org
Mon Jul 25 15:24:49 CEST 2016


Commit: 7d69a4f270b0835d3fed1aa0d2172b838ddc7166
Author: Phil Gosch
Date:   Mon Jul 25 15:24:31 2016 +0200
Branches: soc-2016-uv_tools
https://developer.blender.org/rB7d69a4f270b0835d3fed1aa0d2172b838ddc7166

Small optimization to last commit (thx nexyon for the hint)

===================================================================

M	source/blender/editors/uvedit/uvedit_parametrizer.c

===================================================================

diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 0beee80..3ac80d6 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -691,8 +691,7 @@ int p_float_to_int_range(float f, int range)
 int p_float_to_int_range_remainder(float f, int range, float *re)
 {
 	int val = p_float_to_int_range(f, range);
-	float section = 1.0f / (float)range;
-	*re = (f - (((float)val) * section)) / section;
+	float bla = f * range - val;
 	
 	return val;
 }




More information about the Bf-blender-cvs mailing list