Packages

trait Vector extends AnyRef

Mixin representing a 2D vector.

The methods of this mixin won't alter the values of the classes that extends it.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Vector
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def x: Double

    Getter for the vector x component

    Getter for the vector x component

    returns

    x component

  2. abstract def y: Double

    Getter for the vector y component

    Getter for the vector y component

    returns

    y component

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(v: Vector): Vector

    Vector addition.

    Vector addition. Leaves this vector unchanged.

    v

    vector to add

    returns

    addition result as a new instance

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def divide(v: Double): Vector

    Vector-scalar division.

    Vector-scalar division. Leaves this vector unchanged.

    v

    scalar

    returns

    division result as a new instance

  8. def dot(v: Vector): Double

    Vector dot product

    Vector dot product

    v

    vector to use for dot product

    returns

    dot product

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getMagnitude: Double

    Gets the magnitude (module) of the vector applying parallelogram law

    Gets the magnitude (module) of the vector applying parallelogram law

    returns

    magnitude of this vector

  14. def getNewMagnitude(desiredMagnitude: Double): Vector

    Scales this vector magnitude (module) with the desired one

    Scales this vector magnitude (module) with the desired one

    desiredMagnitude

    desired vector magnitude

    returns

    a new vector with the specified module

  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def limit(maxMagnitude: Double): Vector

    Limits the vector's magnitude if it is greater than the given one

    Limits the vector's magnitude if it is greater than the given one

    maxMagnitude

    the max magnitude of the vector

    returns

    a new vector

  18. def multiply(v: Double): Vector

    Vector-scalar multiplication.

    Vector-scalar multiplication. Leaves this vector unchanged.

    v

    scalar to multiply

    returns

    multiplication mu result as a new instance

  19. def multiply(v: Vector): Vector

    Vector multiplication.

    Vector multiplication. Leaves this vector unchanged.

    v

    vector to multiply

    returns

    multiplication result as a new instance

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def normalized(): Vector

    Gets the vector normalized

    Gets the vector normalized

    returns

    a new normalized instance of this vector

  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def subtract(v: Vector): Vector

    Vector subtraction.

    Vector subtraction. Leaves this vector unchanged.

    v

    vector to subtract

    returns

    subtraction result as a new instance

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped