replace various uses of math.sqrt with more concise math.hypot #40416

Closed
opened 2014-05-29 04:14:36 +02:00 by Lawrence D'Oliveiro · 6 comments

This patch replaces long-winded calls of the form

math.sqrt(x * x + y * x)

with the more concise

math.hypot(x, y)

Also in the Node Tools addon, I noticed a couple of instances of

sqrt(x * x)

which could be written more concisely as

abs(x)

sqrt-hypot.patch

This patch replaces long-winded calls of the form ``` math.sqrt(x * x + y * x) ``` with the more concise ``` math.hypot(x, y) ``` Also in the Node Tools addon, I noticed a couple of instances of ``` sqrt(x * x) ``` which could be written more concisely as ``` abs(x) ``` [sqrt-hypot.patch](https://archive.blender.org/developer/F91788/sqrt-hypot.patch)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @ldo

Added subscriber: @ldo

I’m not sure who to assign this to; the module owner list doesn’t mention anybody for addons.

I’m not sure who to assign this to; the [module owner list ](http://wiki.blender.org/index.php/Dev:Doc/Process/Module_Owners/List) doesn’t mention anybody for addons.
Bastien Montagne self-assigned this 2014-05-29 09:11:21 +02:00

That’s a patch easy to handle, perfect for me! :)

That’s a patch easy to handle, perfect for me! :)

Committed as 97039067da, thanks for the patch!

Committed as 97039067da, thanks for the patch!

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#40416
No description provided.