com.io7m.jtensors.parameterized

## Class PVectorM3I<T>

- java.lang.Object
- - com.io7m.jtensors.parameterized.PVectorM3I<T>

- Type Parameters:
    `T` - A phantom type parameter
  All Implemented Interfaces:
    PVector3IType<T>, PVectorReadable2IType<T>, PVectorReadable3IType<T>, PVectorWritable2IType<T>, PVectorWritable3IType<T>, Vector3IType, VectorReadable2IType, VectorReadable3IType, VectorWritable2IType, VectorWritable3IType

      public final class PVectorM3I<T>
      extends Object
      implements PVector3IType<T>

  A three-dimensional mutable vector type with integer elements.

  Values of this type cannot be accessed safely from multiple threads without explicit synchronization.

  Since:
    7.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PVectorM3I.ContextPVM3I` Preallocated storage to allow all vector functions to run without allocating.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PVectorM3I()` Default constructor, initializing the vector with values `[0, 0, 0]`.
    `PVectorM3I(int in_x, int in_y, int in_z)` Construct a vector initialized with the given values.
    `PVectorM3I(PVectorReadable3IType<T> in_v)` Construct a vector initialized with the values given in the vector `in_v`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T,V extends PVectorWritable3IType<T>> V` | `absolute(PVectorReadable3IType<T> v, V out)` Calculate the absolute values of the elements in vector `v`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `absoluteInPlace(V v)` Calculate the absolute values of the elements in vector `v`, saving the result to `v`.
    `static <T,V extends PVectorWritable3IType<T>> V` | `add(PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1, V out)` Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `addInPlace(V v0, PVectorReadable3IType<T> v1)` Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `v0`.
    `static <T,V extends PVectorWritable3IType<T>> V` | `addScaled(PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1, double r, V out)` Calculate the element-wise sum of the vectors `v0` and the element-wise product of `v1` and `r`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `addScaledInPlace(V v0, PVectorReadable3IType<T> v1, double r)` Calculate the element-wise sum of the vectors `v0` and the element-wise product of `v1` and `r`, saving the result to `v0`.
    `static <T,V extends PVectorWritable3IType<T>> V` | `clamp(PVectorReadable3IType<T> v, int minimum, int maximum, V out)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <T,V extends PVectorWritable3IType<T>> V` | `clampByPVector(PVectorReadable3IType<T> v, PVectorReadable3IType<T> minimum, PVectorReadable3IType<T> maximum, V out)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum` and `maximum`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampByPVectorInPlace(V v, PVectorReadable3IType<T> minimum, PVectorReadable3IType<T> maximum)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum` and `maximum`, saving the result to `v`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampInPlace(V v, int minimum, int maximum)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <T,V extends PVectorWritable3IType<T>> V` | `clampMaximum(PVectorReadable3IType<T> v, int maximum, V out)` Clamp the elements of the vector `v` to the range {@code [-Infinity ..
    `static <T,V extends PVectorWritable3IType<T>> V` | `clampMaximumByPVector(PVectorReadable3IType<T> v, PVectorReadable3IType<T> maximum, V out)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `maximum`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampMaximumByPVectorInPlace(V v, PVectorReadable3IType<T> maximum)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `maximum`, saving the result to `v`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampMaximumInPlace(V v, int maximum)` Clamp the elements of the vector `v` to the range {@code [-Infinity ..
    `static <T,V extends PVectorWritable3IType<T>> V` | `clampMinimum(PVectorReadable3IType<T> v, int minimum, V out)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <T,V extends PVectorWritable3IType<T>> V` | `clampMinimumByPVector(PVectorReadable3IType<T> v, PVectorReadable3IType<T> minimum, V out)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampMinimumByPVectorInPlace(V v, PVectorReadable3IType<T> minimum)` Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum`, saving the result to `v`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `clampMinimumInPlace(V v, int minimum)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <T,U extends PVectorWritable3IType<T>> U` | `copy(PVectorReadable3IType<T> input, U output)` Copy all elements of the vector `input` to the vector `output`.
    `void` | `copyFrom2I(VectorReadable2IType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom3I(VectorReadable3IType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped2I(PVectorReadable2IType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped3I(PVectorReadable3IType<T> in_v)` Set the current vector to the contents of the input vector.
    `static <T> int` | `distance(PVectorM3I.ContextPVM3I c, PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1)` Calculate the distance between the two vectors `v0` and `v1`.
    `static <T> int` | `dotProduct(PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1)` Calculate the scalar product of the vectors `v0` and `v1`.
    `boolean` | `equals(Object obj)`
    `int` | `getXI()`
    `int` | `getYI()`
    `int` | `getZI()`
    `int` | `hashCode()`
    `static <T,V extends PVectorWritable3IType<T>> V` | `interpolateLinear(PVectorM3I.ContextPVM3I c, PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1, double alpha, V r)` Linearly interpolate between `v0` and `v1` by the amount `alpha`, saving the result to `r`.
    `static <T> int` | `magnitude(PVectorReadable3IType<T> v)` Calculate the magnitude of the vector `v`.
    `static <T> int` | `magnitudeSquared(PVectorReadable3IType<T> v)` Calculate the squared magnitude of the vector `v`.
    `static <T,V extends PVectorWritable3IType<T>> V` | `projection(PVectorReadable3IType<T> p, PVectorReadable3IType<T> q, V r)` Calculate the projection of the vector `p` onto the vector `q`, saving the result in `r`.
    `static <T,V extends PVectorWritable3IType<T>> V` | `scale(PVectorReadable3IType<T> v, double r, V out)` Scale the vector `v` by the scalar `r`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `scaleInPlace(V v, int r)` Scale the vector `v` by the scalar `r`, saving the result to `v`.
    `void` | `set2I(int in_x, int in_y)` Set the current `x` and `y` values of the current vector.
    `void` | `set3I(int in_x, int in_y, int in_z)` Set the current `x`, `y` and `z` values of the current vector.
    `void` | `setXI(int in_x)` Set the current `x` value of the current vector.
    `void` | `setYI(int in_y)` Set the current `y` value of the current vector.
    `void` | `setZI(int in_z)` Set the current `z` value of the current vector.
    `static <T,V extends PVectorWritable3IType<T>> V` | `subtract(PVectorReadable3IType<T> v0, PVectorReadable3IType<T> v1, V out)` Subtract the vector `v1` from the vector `v0`, saving the result to `out`.
    `static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V` | `subtractInPlace(V v0, PVectorReadable3IType<T> v1)` Subtract the vector `v1` from the vector `v0`, saving the result to `v0`.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PVectorM3I

          public PVectorM3I()

      Default constructor, initializing the vector with values `[0, 0, 0]`.

    - #### PVectorM3I

          public PVectorM3I(int in_x,
                            int in_y,
                            int in_z)

      Construct a vector initialized with the given values.
      Parameters:
        `in_x` - The `x` value
        `in_y` - The `y` value
        `in_z` - The `z` value

    - #### PVectorM3I

          public PVectorM3I(PVectorReadable3IType<T> in_v)

      Construct a vector initialized with the values given in the vector `in_v`.
      Parameters:
        `in_v` - The source vector

  - ### Method Detail

    - #### absolute

          public static <T,V extends PVectorWritable3IType<T>> V absolute(PVectorReadable3IType<T> v,
                                                                          V out)
                                                                   throws ArithmeticException

      Calculate the absolute values of the elements in vector `v`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `out` - The output vector
      Returns:
        `(abs v.x, abs v.y, abs v.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### absoluteInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V absoluteInPlace(V v)
                                                                                                     throws ArithmeticException

      Calculate the absolute values of the elements in vector `v`, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
      Returns:
        `(abs v.x, abs v.y, abs v.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### add

          public static <T,V extends PVectorWritable3IType<T>> V add(PVectorReadable3IType<T> v0,
                                                                     PVectorReadable3IType<T> v1,
                                                                     V out)
                                                              throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
        `out` - The output vector
      Returns:
        `(v0.x + v1.x, v0.y + v1.y, v0.z + v1.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### addInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V addInPlace(V v0,
                                                                                                       PVectorReadable3IType<T> v1)
                                                                                                throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `v0`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
      Returns:
        `(v0.x + v1.x, v0.y + v1.y, v0.z + v1.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### addScaled

          public static <T,V extends PVectorWritable3IType<T>> V addScaled(PVectorReadable3IType<T> v0,
                                                                           PVectorReadable3IType<T> v1,
                                                                           double r,
                                                                           V out)
                                                                    throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and the element-wise product of `v1` and `r`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
        `out` - The output vector
        `r` - The scaling value
      Returns:
        `(v0.x + (v1.x * r), v0.y + (v1.y * r), v0.z + (v1.z * r))`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### addScaledInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V addScaledInPlace(V v0,
                                                                                                             PVectorReadable3IType<T> v1,
                                                                                                             double r)
                                                                                                      throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and the element-wise product of `v1` and `r`, saving the result to `v0`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
        `r` - The scaling value
      Returns:
        `(v0.x + (v1.x * r), v0.y + (v1.y * r), v0.z + (v1.z * r))`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### clamp

          public static <T,V extends PVectorWritable3IType<T>> V clamp(PVectorReadable3IType<T> v,
                                                                       int minimum,
                                                                       int maximum,
                                                                       V out)

      Clamp the elements of the vector `v` to the range `[minimum .. maximum]` inclusive, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The minimum allowed value
        `maximum` - The maximum allowed value
        `out` - The output vector
      Returns:
        A vector with both elements equal to at most `maximum` and at least `minimum`

    - #### clampByPVector

          public static <T,V extends PVectorWritable3IType<T>> V clampByPVector(PVectorReadable3IType<T> v,
                                                                                PVectorReadable3IType<T> minimum,
                                                                                PVectorReadable3IType<T> maximum,
                                                                                V out)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum` and `maximum`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The vector containing the minimum acceptable values
        `maximum` - The vector containing the maximum acceptable values
        `out` - The output vector
      Returns:
        `(min(max(v.x, minimum.x), maximum.x), min(max(v.y, minimum.y), maximum.y), min(max(v.z, minimum.z), maximum.z))`

    - #### clampByPVectorInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampByPVectorInPlace(V v,
                                                                                                                  PVectorReadable3IType<T> minimum,
                                                                                                                  PVectorReadable3IType<T> maximum)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum` and `maximum`, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The vector containing the minimum acceptable values
        `maximum` - The vector containing the maximum acceptable values
      Returns:
        `(min(max(v.x, minimum.x), maximum.x), min(max(v.y, minimum.y), maximum.y), min(max(v.z, minimum.z), maximum.z))`

    - #### clampInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampInPlace(V v,
                                                                                                         int minimum,
                                                                                                         int maximum)

      Clamp the elements of the vector `v` to the range `[minimum .. maximum]` inclusive, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The minimum allowed value
        `maximum` - The maximum allowed value
      Returns:
        A vector with both elements equal to at most `maximum` and at least `minimum`, in `v`

    - #### clampMaximum

          public static <T,V extends PVectorWritable3IType<T>> V clampMaximum(PVectorReadable3IType<T> v,
                                                                              int maximum,
                                                                              V out)

      Clamp the elements of the vector `v` to the range `[-Infinity .. maximum]` inclusive, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `out` - The output vector
        `maximum` - The maximum allowed value
      Returns:
        A vector with both elements equal to at most `maximum`

    - #### clampMaximumByPVector

          public static <T,V extends PVectorWritable3IType<T>> V clampMaximumByPVector(PVectorReadable3IType<T> v,
                                                                                       PVectorReadable3IType<T> maximum,
                                                                                       V out)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `maximum`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `maximum` - The vector containing the maximum acceptable values
        `out` - The output vector
      Returns:
        `(min(v.x, maximum.x), min(v.y, maximum.y), min(v.z, maximum.z))`

    - #### clampMaximumByPVectorInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampMaximumByPVectorInPlace(V v,
                                                                                                                         PVectorReadable3IType<T> maximum)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `maximum`, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `maximum` - The vector containing the maximum acceptable values
      Returns:
        `(min(v.x, maximum.x), min(v.y, maximum.y), min(v.z, maximum.z))`

    - #### clampMaximumInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampMaximumInPlace(V v,
                                                                                                                int maximum)

      Clamp the elements of the vector `v` to the range `[-Infinity .. maximum]` inclusive, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `maximum` - The maximum allowed value
      Returns:
        A vector with both elements equal to at most `maximum` , in `v`

    - #### clampMinimum

          public static <T,V extends PVectorWritable3IType<T>> V clampMinimum(PVectorReadable3IType<T> v,
                                                                              int minimum,
                                                                              V out)

      Clamp the elements of the vector `v` to the range `[minimum .. Infinity]` inclusive, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `out` - The output vector
        `minimum` - The minimum allowed value
      Returns:
        A vector with both elements equal to at least `minimum`

    - #### clampMinimumByPVector

          public static <T,V extends PVectorWritable3IType<T>> V clampMinimumByPVector(PVectorReadable3IType<T> v,
                                                                                       PVectorReadable3IType<T> minimum,
                                                                                       V out)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `out` - The output vector
        `minimum` - The vector containing the minimum acceptable values
      Returns:
        `(max(v.x, minimum.x), max(v.y, minimum.y), max(v.z, minimum.z))`

    - #### clampMinimumByPVectorInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampMinimumByPVectorInPlace(V v,
                                                                                                                         PVectorReadable3IType<T> minimum)

      Clamp the elements of the vector `v` to the inclusive range given by the corresponding elements in `minimum`, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The vector containing the minimum acceptable values
      Returns:
        `(max(v.x, minimum.x), max(v.y, minimum.y), max(v.z, minimum.z))` , in `v`

    - #### clampMinimumInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V clampMinimumInPlace(V v,
                                                                                                                int minimum)

      Clamp the elements of the vector `v` to the range `[minimum .. Infinity]` inclusive, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `minimum` - The minimum allowed value
      Returns:
        A vector with both elements equal to at least `minimum`, in `v`.

    - #### copy

          public static <T,U extends PVectorWritable3IType<T>> U copy(PVectorReadable3IType<T> input,
                                                                      U output)

      Copy all elements of the vector `input` to the vector `output`.
      Type Parameters:
        `U` - The specific type of vector
        `T` - A phantom type parameter
      Parameters:
        `input` - The input vector
        `output` - The output vector
      Returns:
        output

    - #### distance

          public static <T> int distance(PVectorM3I.ContextPVM3I c,
                                         PVectorReadable3IType<T> v0,
                                         PVectorReadable3IType<T> v1)
                                  throws ArithmeticException

      Calculate the distance between the two vectors `v0` and `v1`.
      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `c` - Preallocated storage
        `v0` - The left input vector
        `v1` - The right input vector
      Returns:
        The distance between the two vectors.
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow
      Since:
        7.0.0

    - #### dotProduct

          public static <T> int dotProduct(PVectorReadable3IType<T> v0,
                                           PVectorReadable3IType<T> v1)
                                    throws ArithmeticException

      Calculate the scalar product of the vectors `v0` and `v1`.
      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
      Returns:
        The scalar product of the two vectors
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### interpolateLinear

          public static <T,V extends PVectorWritable3IType<T>> V interpolateLinear(PVectorM3I.ContextPVM3I c,
                                                                                   PVectorReadable3IType<T> v0,
                                                                                   PVectorReadable3IType<T> v1,
                                                                                   double alpha,
                                                                                   V r)

      Linearly interpolate between `v0` and `v1` by the amount `alpha`, saving the result to `r`. The `alpha` parameter controls the degree of interpolation, such that:
      - `interpolateLinear(v0, v1, 0.0, r) -> r = v0`
      - `interpolateLinear(v0, v1, 1.0, r) -> r = v1`
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `c` - Preallocated storage
        `v0` - The left input vector
        `v1` - The right input vector
        `alpha` - The interpolation value, between `0.0` and `1.0`
        `r` - The result vector
      Returns:
        `r`
      Since:
        7.0.0

    - #### magnitude

          public static <T> int magnitude(PVectorReadable3IType<T> v)
                                   throws ArithmeticException

      Calculate the magnitude of the vector `v`. Correspondingly, `magnitude(normalize(v)) == 1.0`.
      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `v` - The input vector
      Returns:
        The magnitude of the input vector
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### magnitudeSquared

          public static <T> int magnitudeSquared(PVectorReadable3IType<T> v)
                                          throws ArithmeticException

      Calculate the squared magnitude of the vector `v`.
      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `v` - The input vector
      Returns:
        The squared magnitude of the input vector
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### projection

          public static <T,V extends PVectorWritable3IType<T>> V projection(PVectorReadable3IType<T> p,
                                                                            PVectorReadable3IType<T> q,
                                                                            V r)
                                                                     throws ArithmeticException

      Calculate the projection of the vector `p` onto the vector `q`, saving the result in `r`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `p` - The left vector
        `q` - The right vector
        `r` - The output vector
      Returns:
        `((dotProduct p q) / magnitudeSquared q) * q`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### scale

          public static <T,V extends PVectorWritable3IType<T>> V scale(PVectorReadable3IType<T> v,
                                                                       double r,
                                                                       V out)
                                                                throws ArithmeticException

      Scale the vector `v` by the scalar `r`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `r` - The scaling value
        `out` - The output vector
      Returns:
        `(v.x * r, v.y * r, v.z * r)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### scaleInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V scaleInPlace(V v,
                                                                                                         int r)
                                                                                                  throws ArithmeticException

      Scale the vector `v` by the scalar `r`, saving the result to `v`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v` - The input vector
        `r` - The scaling value
      Returns:
        `(v.x * r, v.y * r, v.z * r)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### subtract

          public static <T,V extends PVectorWritable3IType<T>> V subtract(PVectorReadable3IType<T> v0,
                                                                          PVectorReadable3IType<T> v1,
                                                                          V out)
                                                                   throws ArithmeticException

      Subtract the vector `v1` from the vector `v0`, saving the result to `out`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
        `out` - The output vector
      Returns:
        `(v0.x - v1.x, v0.y - v1.y, v0.z - v1.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### subtractInPlace

          public static <T,V extends PVectorWritable3IType<T> & PVectorReadable3IType<T>> V subtractInPlace(V v0,
                                                                                                            PVectorReadable3IType<T> v1)
                                                                                                     throws ArithmeticException

      Subtract the vector `v1` from the vector `v0`, saving the result to `v0`.
      Type Parameters:
        `T` - A phantom type parameter
        `V` - The precise type of vector
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
      Returns:
        `(v0.x - v1.x, v0.y - v1.y, v0.z - v1.z)`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow

    - #### copyFrom2I

          public void copyFrom2I(VectorReadable2IType in_v)

      Description copied from interface: `VectorWritable2IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom2I` in interface `VectorWritable2IType`
      Parameters:
        `in_v` - The input vector

    - #### copyFrom3I

          public void copyFrom3I(VectorReadable3IType in_v)

      Description copied from interface: `VectorWritable3IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom3I` in interface `VectorWritable3IType`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped2I

          public void copyFromTyped2I(PVectorReadable2IType<T> in_v)

      Description copied from interface: `PVectorWritable2IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped2I` in interface `PVectorWritable2IType<T>`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped3I

          public void copyFromTyped3I(PVectorReadable3IType<T> in_v)

      Description copied from interface: `PVectorWritable3IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped3I` in interface `PVectorWritable3IType<T>`
      Parameters:
        `in_v` - The input vector

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getXI

          public int getXI()

      Specified by:
        `getXI` in interface `VectorReadable2IType`
      Returns:
        The X value of the given vector.

    - #### setXI

          public void setXI(int in_x)

      Description copied from interface: `VectorWritable2IType`
      Set the current `x` value of the current vector.
      Specified by:
        `setXI` in interface `VectorWritable2IType`
      Parameters:
        `in_x` - The new `x` value.

    - #### getYI

          public int getYI()

      Specified by:
        `getYI` in interface `VectorReadable2IType`
      Returns:
        The Y value of the given vector.

    - #### setYI

          public void setYI(int in_y)

      Description copied from interface: `VectorWritable2IType`
      Set the current `y` value of the current vector.
      Specified by:
        `setYI` in interface `VectorWritable2IType`
      Parameters:
        `in_y` - The new `y` value.

    - #### getZI

          public int getZI()

      Specified by:
        `getZI` in interface `VectorReadable3IType`
      Returns:
        The Z value of the given vector.

    - #### setZI

          public void setZI(int in_z)

      Description copied from interface: `VectorWritable3IType`
      Set the current `z` value of the current vector.
      Specified by:
        `setZI` in interface `VectorWritable3IType`
      Parameters:
        `in_z` - The new `z` value.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### set2I

          public void set2I(int in_x,
                            int in_y)

      Description copied from interface: `VectorWritable2IType`
      Set the current `x` and `y` values of the current vector.
      Specified by:
        `set2I` in interface `VectorWritable2IType`
      Parameters:
        `in_x` - The new `x` value.
        `in_y` - The new `y` value.

    - #### set3I

          public void set3I(int in_x,
                            int in_y,
                            int in_z)

      Description copied from interface: `VectorWritable3IType`
      Set the current `x`, `y` and `z` values of the current vector.
      Specified by:
        `set3I` in interface `VectorWritable3IType`
      Parameters:
        `in_x` - The new `x` value.
        `in_y` - The new `y` value.
        `in_z` - The new `z` value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015 <code@io7m.com> http://io7m.com