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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-05-29 11:27:38 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-05-29 11:27:38 +0400
commit97039067dacef98b10f985770468a8eb4dd97aa9 (patch)
tree7b33629146fa279df4cb6164c9a6c7cf478c8d58 /mesh_inset
parentfda099ad2e498e1f7a95977b1a4e07608ff481dc (diff)
Replace some 'sqrt(a*a, b*b)' by 'hypot(a, b)'.
Patch by ldo (Lawrence D'Oliveiro), with very minor changes by myself.
Diffstat (limited to 'mesh_inset')
-rw-r--r--mesh_inset/triquad.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesh_inset/triquad.py b/mesh_inset/triquad.py
index 88affa89..0c4fc84a 100644
--- a/mesh_inset/triquad.py
+++ b/mesh_inset/triquad.py
@@ -22,7 +22,7 @@
from . import geom
import math
import random
-from math import sqrt
+from math import sqrt, hypot
# Points are 3-tuples or 2-tuples of reals: (x,y,z) or (x,y)
# Faces are lists of integers (vertex indices into coord lists)
@@ -1051,7 +1051,7 @@ def Add2(a, b):
def Length2(v):
"""Return length of vector v=(x,y)."""
- return sqrt(v[0] * v[0] + v[1] * v[1])
+ return hypot(v[0], v[1])
def LinInterp2(a, b, alpha):