float Distance( Vector3Int other )
float Distance( Vector3 other )

book_4_sparkGenerated
code_blocksInput

Description

The Distance method calculates the Euclidean distance between the current Vector3Int instance and another specified Vector3Int instance. This method is useful for determining how far apart two points are in a 3D integer space.

Usage

To use the Distance method, you need to have two Vector3Int instances. Call the method on one instance and pass the other instance as a parameter. The method will return a float representing the distance between the two vectors.

Example

Vector3Int pointA = new Vector3Int(1, 2, 3);
Vector3Int pointB = new Vector3Int(4, 5, 6);

float distance = pointA.Distance(pointB);
// distance will be approximately 5.196