What does this compute?
float d = Vector2.Distance(a, b);
- The distance between two points
- The dot product of the two vectors
- A pseudo-random floating value
- The current display frame rate
Vector2.Distance returns the length of a-b.
Play Game Dev ▸
float d = Vector2.Distance(a, b);