Vectors

by Dajinomight
A Vector datum library with overloaded operators [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Dajinomight.Vectors##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Dajinomight.Vectors##version=1

46 downloads
Version 0.0.2
Date added: Sep 27 2017
Last updated: Oct 3 2017
0 fans
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 >