logik.li | niflheim.logik.li
site map

vadd

vadd is a small perl script to perform vector addition. You can pass arguments to it on the command line in the form:

10N30

Where 10 is the magnitude, 30 is the angle (starting from 'North' being 0 and moving clockwise), and N is any non-numeric character to separate the magnitude from the angle.

Just pass as many vectors as you'd like to add. For example, to add five vectors:

vadd 8x32 90x190 87x0 65x270 70x90

And vadd will print out Resultant vector: 92.4236327595574 54.894231489855°

License

vadd is relased under the MIT/X Consortium License.

Powered by werc & Norsefire   England Prevails!