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 /add_mesh_ant_landscape.py
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 'add_mesh_ant_landscape.py')
-rw-r--r--add_mesh_ant_landscape.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/add_mesh_ant_landscape.py b/add_mesh_ant_landscape.py
index b99eb2be..e83b6134 100644
--- a/add_mesh_ant_landscape.py
+++ b/add_mesh_ant_landscape.py
@@ -332,7 +332,7 @@ def landscape_gen(x,y,z,falloffsize,options=[0,1.0,1, 0,0,1.0,0,6,1.0,2.0,1.0,2.
# edge falloff
if sphere == 0: # no edge falloff if spherical
if falloff != 0:
- fallofftypes = [ 0, sqrt((x*x)**2+(y*y)**2), sqrt(x*x+y*y), sqrt(y*y), sqrt(x*x) ]
+ fallofftypes = [0, hypot(x * x, y * y), hypot(x, y), abs(y), abs(x)]
dist = fallofftypes[ falloff]
if falloff ==1:
radius = (falloffsize/2)**2