Distance from start to end in the unit circle
Eighth of a circle, helpful for calculating viewing angle
Pre-Calculated N-W-S-E directions in radiants. Why is that? Because our coordinate system x-axis grows to the right, thus is 0 degrees at that point, visually EAST. The y-axis grows downwards. So from that we deducted the following 4 directions.
The scalar distance between two points (x1,y1) and (x2,y2). See https://en.wikipedia.org/wiki/Euclidean_distance
We might use this to calculate the distance an enemy has to the player.
Scalar, euclidean distance between two points
Calculates the angle difference between two angles. Kind of like a pizza slice.
angle in radians on the left
angle in radians on the right
Check whether a Point (Vector) is within view and get the angle from our viewpoint.
The viewpoint from which we're looking at the target at, usually the player
Direction in radians (0-2pi) which we're looking in
The target which we want to check IF we're looking at
The field of view OF ONE EYE. This represents HALF THE FOV of the screen
Boolean === False IF target is not in view ELSE the angle between origin and target
Generated using TypeDoc
Pure functions and variable definitions to aid in mathy calculations.