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.
- Alphabetic
- By Inheritance
- Vector
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add(v: Vector): Vector
Vector addition.
Vector addition. Leaves this vector unchanged.
- v
vector to add
- returns
addition result as a new instance
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
divide(v: Double): Vector
Vector-scalar division.
Vector-scalar division. Leaves this vector unchanged.
- v
scalar
- returns
division result as a new instance
-
def
dot(v: Vector): Double
Vector dot product
Vector dot product
- v
vector to use for dot product
- returns
dot product
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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
-
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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
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
-
def
multiply(v: Vector): Vector
Vector multiplication.
Vector multiplication. Leaves this vector unchanged.
- v
vector to multiply
- returns
multiplication result as a new instance
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
normalized(): Vector
Gets the vector normalized
Gets the vector normalized
- returns
a new normalized instance of this vector
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
subtract(v: Vector): Vector
Vector subtraction.
Vector subtraction. Leaves this vector unchanged.
- v
vector to subtract
- returns
subtraction result as a new instance
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )