#1
|
|||
|
|||
viz.Vector and normalize method
Vizard Support,
This is a suggestion and not a question. Any chance you could make the normalize method in the viz.Vector class return the normalized vector so we can use the result in a single lined expression? So I can do things like this in one line: circleVec = (viz.Vector(1,0,0) + viz.Vector(0,1,0)).normalize() + offsetFromCenterVector It has always kind of bothered me that I can't do this, especially after writing GLSL code where I get the result of the normalized vector in an expression. Thanks, George |
#2
|
|||
|
|||
Thanks for the suggestion. In a future version vector.normalize will return itself so it can be passed directly to a function. However, you can currently normalize a vector during creation:
Code:
v = viz.Vector([0,3,0],normalize=True) Code:
v = viz.Vector([0,3,0],length=5) |
Tags |
normalize, suggestion, viz.vector |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
morphTo: Is there a smoother method? | Josh | Vizard | 1 | 03-08-2010 10:50 AM |
read method needed | Woosuk Jang | Vizard | 3 | 06-22-2009 06:49 PM |
parallel port method | bionic1 | Vizard | 2 | 05-04-2009 07:41 PM |
mapping method | FlyingFish | Vizard | 1 | 07-12-2007 10:06 AM |
method of a class instance not accepted as Callback | Gilliard | Vizard | 1 | 08-10-2005 06:49 PM |