WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Norm of a vector (https://forum.worldviz.com/showthread.php?t=2024)

Chrissy2009 05-12-2009 01:21 AM

Norm of a vector
 
Hi,
how can I calculate the norm of a vector or how can I extract a root in pyhton?

Sorry, but I can't find any information about this.. :(

Thanks a lot.

farshizzo 05-12-2009 09:03 AM

You can use the viz.Vector class to get the length of any vector. Here is some code:
Code:

v = viz.Vector(0,3,0)
print v.length()
v.normalize()
print v.length()



All times are GMT -7. The time now is 09:39 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC