Pular para o conteúdo principal

Vetor3.div()

Método de instância em Vector3.

Descrição

  • Divides this Vector3 by the specified Vector3 and Retorna Um novo Vector3. |
  • Divides this Vector3 by the specified X, Y and Z values and Retorna Um novo Vector3. |
  • Divides this Vector3 by the specified value and Retorna Um novo Vector3. |
  • Retorna the division of this Vector3 by the specified object. |

Method Signature

div(Vector3)
div(float, float, float)
div(float)
div(Object)

Mathematical Definition

\mathbf{r}=\mathbf{a}\oslash\mathbf{b}

Parameters

  • Vector3: 3D vector input.
  • float: scalar numeric input.
  • Object: polymorphic operand; runtime resolves supported numeric/vector types.

Retorna

  • Vector3: returned by overloads of this method.
  • T: returned by overloads of this method.

Mutability

  • Does not modify o atual vector unless explicitly using a Local/Equal variant.

Edge Cases

  • Division by zero can produce Infinity or NaN.
  • Very small denominators amplify floating-point noise.
  • Runtime-specific guarding/clamping may apply in engine internals.

Usage Example

Vector3 a = new Vector3(10f, 2f, -5f);
Vector3 b = new Vector3(1f, 0.5f, 3f);
Vector3 result = a.div(b);

Mathematical Example

Example input/output depends on overload; for vector arithmetic operations this is typically computed per-component.

Visualization