diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 11:39:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 11:39:00 +0400 |
commit | 71692e802fc50ad9dd76659d2868843e708dbd40 (patch) | |
tree | bbdccf1ef33cc577b0fcb900508caafe6bae3531 /doc/python_api | |
parent | 5b3906728fa358fccd857cbeca85ff102df6e6c7 (diff) |
py api:
- added menu templates
- move template menu into the header of the text editor (so users will find more easily)
- updated mathutils examples, switching the order of multiplication.
Diffstat (limited to 'doc/python_api')
-rw-r--r-- | doc/python_api/examples/mathutils.Vector.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/python_api/examples/mathutils.Vector.py b/doc/python_api/examples/mathutils.Vector.py index 880b4ef2590..bf1fc70353f 100644 --- a/doc/python_api/examples/mathutils.Vector.py +++ b/doc/python_api/examples/mathutils.Vector.py @@ -1,15 +1,15 @@ import mathutils # zero length vector -vec = mathutils.Vector((0, 0, 1)) +vec = mathutils.Vector((0.0, 0.0, 1.0)) # unit length vector vec_a = vec.copy().normalize() -vec_b = mathutils.Vector((0, 1, 2)) +vec_b = mathutils.Vector((0.0, 1.0, 2.0)) -vec2d = mathutils.Vector((1, 2)) -vec3d = mathutils.Vector((1, 0, 0)) +vec2d = mathutils.Vector((1.0, 2.0)) +vec3d = mathutils.Vector((1.0, 0.0, 0.0)) vec4d = vec_a.to_4d() # other mathutuls types @@ -34,9 +34,9 @@ vec_a + vec_b vec_a - vec_b vec_a * vec_b vec_a * 10.0 -vec_a * matrix +matrix * vec_a +quat * vec_a vec_a * vec_b -vec_a * quat -vec_a @@ -44,6 +44,7 @@ vec_a * quat x = vec_a[0] len(vec) vec_a[:] = vec_b +vec_a[:] = 1.0, 2.0, 3.0 vec2d[:] = vec3d[:2] |