com.io7m.jtensors

## Class VectorM2L

- java.lang.Object
- - com.io7m.jtensors.VectorM2L

- All Implemented Interfaces:
    Vector2LType, VectorReadable2LType, VectorWritable2LType

      public final class VectorM2L
      extends Object
      implements Vector2LType

  A two-dimensional mutable vector type with integer elements.

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

  Since:
    5.3.0

- - ### Nested Class Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VectorM2L()` Default constructor, initializing the vector with values `[0, 0, 0]`.
    `VectorM2L(long in_x, long in_y)` Construct a vector initialized with the given values.
    `VectorM2L(VectorReadable2LType 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 <V extends VectorWritable2LType> V` | `absolute(VectorReadable2LType v, V out)` Calculate the absolute values of the elements in vector `v`, saving the result to `out`.
    `static <V extends VectorWritable2LType & VectorReadable2LType> V` | `absoluteInPlace(V v)` Calculate the absolute values of the elements in vector `v`, saving the result to `v`.
    `static <V extends VectorWritable2LType> V` | `add(VectorReadable2LType v0, VectorReadable2LType v1, V out)` Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `out`.
    `static <V extends VectorWritable2LType & VectorReadable2LType> V` | `addInPlace(V v0, VectorReadable2LType v1)` Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `v0`.
    `static <V extends VectorWritable2LType> V` | `addScaled(VectorReadable2LType v0, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `addScaledInPlace(V v0, VectorReadable2LType 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 double` | `angle(VectorReadable2LType v0, VectorReadable2LType v1)` Calculate the angle between vectors `v0` and `v1`, in radians.
    `static <V extends VectorWritable2LType> V` | `clamp(VectorReadable2LType v, long minimum, long maximum, V out)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <V extends VectorWritable2LType> V` | `clampByVector(VectorReadable2LType v, VectorReadable2LType minimum, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampByVectorInPlace(V v, VectorReadable2LType minimum, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampInPlace(V v, long minimum, long maximum)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <V extends VectorWritable2LType> V` | `clampMaximum(VectorReadable2LType v, long maximum, V out)` Clamp the elements of the vector `v` to the range {@code [-Infinity ..
    `static <V extends VectorWritable2LType> V` | `clampMaximumByVector(VectorReadable2LType v, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampMaximumByVectorInPlace(V v, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampMaximumInPlace(V v, long maximum)` Clamp the elements of the vector `v` to the range {@code [-Infinity ..
    `static <V extends VectorWritable2LType> V` | `clampMinimum(VectorReadable2LType v, long minimum, V out)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <V extends VectorWritable2LType> V` | `clampMinimumByVector(VectorReadable2LType v, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampMinimumByVectorInPlace(V v, VectorReadable2LType 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 <V extends VectorWritable2LType & VectorReadable2LType> V` | `clampMinimumInPlace(V v, long minimum)` Clamp the elements of the vector `v` to the range {@code [minimum ..
    `static <V extends VectorWritable2LType> V` | `copy(VectorReadable2LType input, V output)` Copy all elements of the vector `input` to the vector `output`.
    `void` | `copyFrom2L(VectorReadable2LType in_v)` Set the current vector to the contents of the input vector.
    `static long` | `distance(VectorM2L.ContextVM2L c, VectorReadable2LType v0, VectorReadable2LType v1)` Calculate the distance between the two vectors `v0` and `v1`.
    `static long` | `dotProduct(VectorReadable2LType v0, VectorReadable2LType v1)` Calculate the scalar product of the vectors `v0` and `v1`.
    `boolean` | `equals(Object obj)`
    `long` | `getXL()`
    `long` | `getYL()`
    `int` | `hashCode()`
    `static <V extends VectorWritable2LType> V` | `interpolateLinear(VectorM2L.ContextVM2L c, VectorReadable2LType v0, VectorReadable2LType v1, double alpha, V r)` Linearly interpolate between `v0` and `v1` by the amount `alpha`, saving the result to `r`.
    `static long` | `magnitude(VectorReadable2LType v)` Calculate the magnitude of the vector `v`.
    `static long` | `magnitudeSquared(VectorReadable2LType v)` Calculate the squared magnitude of the vector `v`.
    `static <V extends VectorWritable2LType> V` | `projection(VectorReadable2LType p, VectorReadable2LType q, V r)` Calculate the projection of the vector `p` onto the vector `q`, saving the result in `r`.
    `static <V extends VectorWritable2LType> V` | `scale(VectorReadable2LType v, double r, V out)` Scale the vector `v` by the scalar `r`, saving the result to `out`.
    `static <V extends VectorWritable2LType & VectorReadable2LType> V` | `scaleInPlace(V v, long r)` Scale the vector `v` by the scalar `r`, saving the result to `v`.
    `void` | `set2L(long in_x, long in_y)` Set the current `x` and `y` values of the current vector.
    `void` | `setXL(long in_x)` Set the current `x` value of the current vector.
    `void` | `setYL(long in_y)` Set the current `y` value of the current vector.
    `static <V extends VectorWritable2LType> V` | `subtract(VectorReadable2LType v0, VectorReadable2LType v1, V out)` Subtract the vector `v1` from the vector `v0`, saving the result to `out`.
    `static <V extends VectorWritable2LType & VectorReadable2LType> V` | `subtractInPlace(V v0, VectorReadable2LType 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

    - #### VectorM2L

          public VectorM2L()

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

    - #### VectorM2L

          public VectorM2L(long in_x,
                           long in_y)

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

    - #### VectorM2L

          public VectorM2L(VectorReadable2LType 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 <V extends VectorWritable2LType> V absolute(VectorReadable2LType v,
                                                                    V out)
                                                             throws ArithmeticException

      Calculate the absolute values of the elements in vector `v`, saving the result to `out`.
      Type Parameters:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V absoluteInPlace(V v)
                                                                                           throws ArithmeticException

      Calculate the absolute values of the elements in vector `v`, saving the result to `v`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V add(VectorReadable2LType v0,
                                                               VectorReadable2LType v1,
                                                               V out)
                                                        throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `out`.
      Type Parameters:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V addInPlace(V v0,
                                                                                             VectorReadable2LType v1)
                                                                                      throws ArithmeticException

      Calculate the element-wise sum of the vectors `v0` and `v1`, saving the result to `v0`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V addScaled(VectorReadable2LType v0,
                                                                     VectorReadable2LType 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:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V addScaledInPlace(V v0,
                                                                                                   VectorReadable2LType 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:
        `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

    - #### angle

          public static double angle(VectorReadable2LType v0,
                                     VectorReadable2LType v1)

      Calculate the angle between vectors `v0` and `v1`, in radians.
      Parameters:
        `v0` - The left input vector
        `v1` - The right input vector
      Returns:
        The angle between the two vectors, in radians.

    - #### clamp

          public static <V extends VectorWritable2LType> V clamp(VectorReadable2LType v,
                                                                 long minimum,
                                                                 long maximum,
                                                                 V out)

      Clamp the elements of the vector `v` to the range `[minimum .. maximum]` inclusive, saving the result to `out`.
      Type Parameters:
        `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`

    - #### clampByVector

          public static <V extends VectorWritable2LType> V clampByVector(VectorReadable2LType v,
                                                                         VectorReadable2LType minimum,
                                                                         VectorReadable2LType 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:
        `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))`

    - #### clampByVectorInPlace

          public static <V extends VectorWritable2LType & VectorReadable2LType> V clampByVectorInPlace(V v,
                                                                                                       VectorReadable2LType minimum,
                                                                                                       VectorReadable2LType 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:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V clampInPlace(V v,
                                                                                               long minimum,
                                                                                               long maximum)

      Clamp the elements of the vector `v` to the range `[minimum .. maximum]` inclusive, saving the result to `v`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V clampMaximum(VectorReadable2LType v,
                                                                        long maximum,
                                                                        V out)

      Clamp the elements of the vector `v` to the range `[-Infinity .. maximum]` inclusive, saving the result to `out`.
      Type Parameters:
        `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`

    - #### clampMaximumByVector

          public static <V extends VectorWritable2LType> V clampMaximumByVector(VectorReadable2LType v,
                                                                                VectorReadable2LType 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:
        `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))`

    - #### clampMaximumByVectorInPlace

          public static <V extends VectorWritable2LType & VectorReadable2LType> V clampMaximumByVectorInPlace(V v,
                                                                                                              VectorReadable2LType 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:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V clampMaximumInPlace(V v,
                                                                                                      long maximum)

      Clamp the elements of the vector `v` to the range `[-Infinity .. maximum]` inclusive, saving the result to `v`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V clampMinimum(VectorReadable2LType v,
                                                                        long minimum,
                                                                        V out)

      Clamp the elements of the vector `v` to the range `[minimum .. Infinity]` inclusive, saving the result to `out`.
      Type Parameters:
        `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`

    - #### clampMinimumByVector

          public static <V extends VectorWritable2LType> V clampMinimumByVector(VectorReadable2LType v,
                                                                                VectorReadable2LType 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:
        `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))`

    - #### clampMinimumByVectorInPlace

          public static <V extends VectorWritable2LType & VectorReadable2LType> V clampMinimumByVectorInPlace(V v,
                                                                                                              VectorReadable2LType 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:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V clampMinimumInPlace(V v,
                                                                                                      long minimum)

      Clamp the elements of the vector `v` to the range `[minimum .. Infinity]` inclusive, saving the result to `v`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V copy(VectorReadable2LType input,
                                                                V output)

      Copy all elements of the vector `input` to the vector `output`.
      Type Parameters:
        `V` - The specific vector type
      Parameters:
        `input` - The input vector
        `output` - The output vector
      Returns:
        output

    - #### distance

          public static long distance(VectorM2L.ContextVM2L c,
                                      VectorReadable2LType v0,
                                      VectorReadable2LType v1)
                               throws ArithmeticException

      Calculate the distance between the two vectors `v0` and `v1`.
      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 long dotProduct(VectorReadable2LType v0,
                                        VectorReadable2LType v1)
                                 throws ArithmeticException

      Calculate the scalar product of the vectors `v0` and `v1`.
      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 <V extends VectorWritable2LType> V interpolateLinear(VectorM2L.ContextVM2L c,
                                                                             VectorReadable2LType v0,
                                                                             VectorReadable2LType v1,
                                                                             double alpha,
                                                                             V r)
                                                                      throws ArithmeticException

      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:
        `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`
      Throws:
        `ArithmeticException` - Iff an internal arithmetic operation causes an integer overflow.
      Since:
        7.0.0

    - #### magnitude

          public static long magnitude(VectorReadable2LType v)
                                throws ArithmeticException

      Calculate the magnitude of the vector `v`. Correspondingly, `magnitude(normalize(v)) == 1.0`.
      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 long magnitudeSquared(VectorReadable2LType v)
                                       throws ArithmeticException

      Calculate the squared magnitude of the vector `v`.
      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 <V extends VectorWritable2LType> V projection(VectorReadable2LType p,
                                                                      VectorReadable2LType q,
                                                                      V r)
                                                               throws ArithmeticException

      Calculate the projection of the vector `p` onto the vector `q`, saving the result in `r`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V scale(VectorReadable2LType v,
                                                                 double r,
                                                                 V out)
                                                          throws ArithmeticException

      Scale the vector `v` by the scalar `r`, saving the result to `out`.
      Type Parameters:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V scaleInPlace(V v,
                                                                                               long r)
                                                                                        throws ArithmeticException

      Scale the vector `v` by the scalar `r`, saving the result to `v`.
      Type Parameters:
        `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 <V extends VectorWritable2LType> V subtract(VectorReadable2LType v0,
                                                                    VectorReadable2LType v1,
                                                                    V out)
                                                             throws ArithmeticException

      Subtract the vector `v1` from the vector `v0`, saving the result to `out`.
      Type Parameters:
        `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 <V extends VectorWritable2LType & VectorReadable2LType> V subtractInPlace(V v0,
                                                                                                  VectorReadable2LType v1)
                                                                                           throws ArithmeticException

      Subtract the vector `v1` from the vector `v0`, saving the result to `v0`.
      Type Parameters:
        `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

    - #### copyFrom2L

          public void copyFrom2L(VectorReadable2LType in_v)

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

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getXL

          public long getXL()

      Specified by:
        `getXL` in interface `VectorReadable2LType`
      Returns:
        The X value of the given vector.

    - #### setXL

          public void setXL(long in_x)

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

    - #### getYL

          public long getYL()

      Specified by:
        `getYL` in interface `VectorReadable2LType`
      Returns:
        The Y value of the given vector.

    - #### setYL

          public void setYL(long in_y)

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

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### set2L

          public void set2L(long in_x,
                            long in_y)

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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