Behavioral Location Math: Difference between revisions

From Desynced Wiki
No edit summary
No edit summary
Line 40: Line 40:
The most useful aspect of math on locations is multiplication in that it allows you to manipulate x,y values in relation to the axes of the x,y plane.
The most useful aspect of math on locations is multiplication in that it allows you to manipulate x,y values in relation to the axes of the x,y plane.


Reflection is easy to understand if you think of the axes as mirrors. If you wanted to see where the location reflection is across a
Reflection is easy to understand if you think of the axes as mirrors. If you wanted to see where the location reflection is across that mirror you would multiply by -1 for that axes for X -1,1 for Y 1,-1 and for Both (across the Origin) by -1,-1


[[File:Loction Plane Reflection.png]]
[[File:Loction Plane Reflection.png]]

Revision as of 02:44, 4 September 2023

Location Data Type Composition

As with other (link) Data Types the location data type is a composite of itself and a number component you can test this your self by manual assigning an input a location value under the world tab and using the number slider or input box at the bottom to set a number value after clicking the check box to enter the data if you hover over the input box you just modified you will see a col um of number 3 high like below.

1
6
9

This would be the x, y and number parts of the data type. However in most cases the number component will not do anything useful if you are trying to work with a location.

Relative Location Meaning on the World

As a X location value increases in value the location moves to the right by one grid unit. Decreases move the location to the left.

As a Y location value increases in value the location moves down by one grid unit. Decreases move the location Up.

Location Math

To do math on location data and get usable location results both inputs need to be location data. Add and Subtract work as you would think but only applying the math function from X to X and Y to Y

Locations as a X, Y Plane

All the Locations possible on the world map combine to the equivalent to a X,Y plane in math with certain locations equivalent to the origin and X and Y axes on a plane.

Red: The Origin
Green & Red: The X axis
Yellow & Red: The Y axis

Special Property: Reflection

The most useful aspect of math on locations is multiplication in that it allows you to manipulate x,y values in relation to the axes of the x,y plane.

Reflection is easy to understand if you think of the axes as mirrors. If you wanted to see where the location reflection is across that mirror you would multiply by -1 for that axes for X -1,1 for Y 1,-1 and for Both (across the Origin) by -1,-1



if you were only using multiplication this would have very limited use as it would always be relative to the location 0,0