Vetor3.sqrDistance()
Método de instância em Vector3.
Descrição
- Retorna the squared distância entre this Vector3 and the specified Vector3. Faster than distance() as it doesn't use a square root; useful for comparing distances. |
Method Signature
sqrDistance(Vector3)
Mathematical Definition
Component-wise or runtime-defined transformation based on overload.
Parameters
Vector3: 3D vector input.
Retorna
float: returned by overloads of this method.
Mutability
- Does not modify o atual vector unless explicitly using a
Local/Equalvariant.
Edge Cases
- Zero vectors can produce degenerate outputs for geometric methods.
NaNandInfinityinputs propagate according to IEEE-754 floating-point behavior.- Repeated operations may accumulate floating-point precision error.
Usage Example
Vector3 a = new Vector3(1f, 2f, 3f);
// Call the method according to your overload requirements.
// Example:
// a.sqrDistance(...);
Mathematical Example
Example input/output depends on overload; for vector arithmetic operations this is typically computed per-component.