Vectors

by Dajinomight
A Vector datum library with overloaded operators
ID:2299077
 
This library supports N-dimensional vectors. With the wonderful features added in 512, common algebraic operators are overloaded.

Here's a small snippet of what that looks like:


var/Vector/A = new( 1, 2)
var/Vector/B = new( list(5, 7) )
var/Vector/C = 2 * A + B
usr << A.ToString()
usr << B.ToString()
usr << C.ToString()


The code snippet above will output:


< 1, 2 > < 5, 7 > < 7, 11 >

Login to reply.