dot
Details
Kode wheel segment | Math/Vector |
Style | Math |
Modifiers | None |
Primarily WHEN/DO | DO |
Pre-made brains that use it | Unknown |
Math > Vector > dot
Description
This tile is a Math tile. It is used to determine the dot product of two vectors. The dot product takes the two coordinates (which consist of three numbers each) and returns a single number, which represents the cosine angle of the two vectors. In other words, it works out the angle between to two vectors in a single plane. Most useful for 2D display.
Can be used to determine the position of an object in relation to the left stick position to create a menu selector.
Example Code
WHEN DO [numvar:my angle][=][vectorvar:vector1][dot][vectorvar:leftstickpos]
WHEN [numvar:my angle][>][0.5][and][numvar: my angle][<][0.6] DO [boolvar:highlight right][=][true]
Modifiers
None