pymel.util.patchMath

patchMath()

Overload various math functions to work element-wise on iterables

>>> A = Array([[0, pi/4.0], [pi/2.0, 3.0*pi/4.0], [pi, 5.0*pi/4.0], [3.0*pi/2.0, 7.0*pi/4.0]])
>>> print round(A,2).formated()
[[0.0, 0.79],
 [1.57, 2.36],
 [3.14, 3.93],
 [4.71, 5.5]]
>>> print degrees(A).formated()
[[0.0, 45.0],
 [90.0, 135.0],
 [180.0, 225.0],
 [270.0, 315.0]]
>>> print round(sin(A), 2).formated()
[[0.0, 0.71],
 [1.0, 0.71],
 [0.0, -0.71],
 [-1.0, -0.71]]

Previous topic

pymel.util.pairIter

Next topic

pymel.util.postorder

Core

Core Modules

Other Modules

This Page