diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-28 07:53:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-28 07:53:37 +0400 |
commit | 7199e2288f3df27ee2d21593da64ef4597fb86fd (patch) | |
tree | 33e69c15bb612736079510dd9fbcc055c6f06e51 /source/blender/python/mathutils | |
parent | e6e74381819666141a5dd02d670ef06e64018dc3 (diff) |
Code cleanup: use sqrtf when input and output are float
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index aa035aa05a6..1c8718aa122 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -621,7 +621,7 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) for (x = 0; x < vec_size; x++) { norm += tvec[x] * tvec[x]; } - norm = (float) sqrt(norm); + norm = sqrtf(norm); for (x = 0; x < vec_size; x++) { tvec[x] /= norm; } @@ -742,7 +742,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) for (x = 0; x < vec_size; x++) { norm += tvec[x] * tvec[x]; } - norm = (float) sqrt(norm); + norm = sqrtf(norm); for (x = 0; x < vec_size; x++) { tvec[x] /= norm; } |