Difference between revisions of "Script:Vector Math"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) m (add category) |
||
Line 1: | Line 1: | ||
+ | {{revdate}} | ||
{{script overview | {{script overview | ||
|name=Vector Math | |name=Vector Math | ||
− | |author=[[Stephen L.]] | + | |author=[[Stephen L.]] |
|version=1.0 | |version=1.0 | ||
|lastmodified=2015-01-21 | |lastmodified=2015-01-21 | ||
Line 24: | Line 25: | ||
E.G.: VecMath.dot([1,2,3], [-4,-5,-6]) computes the dot product of [1,2,3] and [-4,-5,-6]. | E.G.: VecMath.dot([1,2,3], [-4,-5,-6]) computes the dot product of [1,2,3] and [-4,-5,-6]. | ||
− | See {{repo|Roll20/roll20-api-scripts/tree/master/Vector%20Math Readme}} for more details. | + | See '''{{repo|Roll20/roll20-api-scripts/tree/master/Vector%20Math Readme}}''' for more details. |
== Changelog == | == Changelog == | ||
See GitHub commit log/wiki page history. | See GitHub commit log/wiki page history. | ||
+ | |||
+ | [[Category:API Meta Scripts]] |
Revision as of 14:18, 4 January 2022
Page Updated: 2022-01-04 |
Version: 1.0
Last Modified: 2015-01-21
Code: Vector Math
Dependencies: none
Conflicts: none
This is a small library for (mostly 2D) vector mathematics. Internally, the vectors used by this library are simple arrays of numbers. The functions provided by this library do not alter the input vectors, treating each vector as an immutable object.
Contents |
Syntax
See code documentation on the README.
Installation and Configuration
Install from the One-Click menu, or from [1].
Install manually: Copy the script's code, available from the menu on the right and stored at Roll20's API GitHub Repository. Paste the code into a new script in your campaign's API Script Editor. Save the new script and it will be available inside your campaign.
Script Use
The library's exposed functions are accessed through the VecMath object, created when the script is loaded. E.G.: VecMath.dot([1,2,3], [-4,-5,-6]) computes the dot product of [1,2,3] and [-4,-5,-6].
See Readme for more details.
Changelog
See GitHub commit log/wiki page history.