Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vector-resultor

Implements a personal vector resultor equation into a Lua function.

alt text

The script returns a single function as per being required. The argument accepts any number of arrays, which will represent a set of vectors, and wherein all arrays include: the magnitude of the vectors as a number at the first index, per an angle given in degrees as a number for the second index.

You may imagine approaching the function for use cases given for two examples of visualized vectors laid out; alt text (Consider central point "A" above the Origin point "O".) alt text

Given that O represents the origin point for the two examples, and we apply the vectors of the examples to the function, we get the geometrically appropriate resultor vector.

During the calculation, consider that the resultor is calculated by the ordnance that the said arrays are given in during input.

The function returns two numbers representing the X and Y positions of the point that the resultor magnitude extends to, as well as a number representing the magnitude, and a number representing the angle (4 numbers total.)

2024 John Louge

About

Implements a personal vector resultor equation into a Lua function.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages