SVector

trait SVector[A]

Root trait for representing Vectors

Root trait for representing Vectors

Type Params
A

Type for the Vector's coordinate values

Authors

garyKeorkunian

Since

0.3.0

Companion
object
class Object
trait Matchable
class Any

Type members

Types

type SVectorType <: SVector[A]

Value members

Abstract methods

def angle(coordinateX: Int, coordinateY: Int, unit: AngleUnit): Angle

The angle between the two Cartesian coordinates at the supplied indices

The angle between the two Cartesian coordinates at the supplied indices

Value Params
coordinateX

index of the abscissa coordinate (defaults to 0)

coordinateY

index of the ordinate coordinate (defaults to 1)

unit

unit for the angle (theta) component (defaults to Radians)

Returns

Angle

def coordinates: Seq[A]

The list of values that makeup the Vector's Cartesian coordinates

The list of values that makeup the Vector's Cartesian coordinates

Create the Cross Product of two Vectors

Create the Cross Product of two Vectors

Value Params
that

Vector[A]

def divide(that: Double): SVectorType

Reduce a Vector

Reduce a Vector

Value Params
that

Double

def dotProduct(that: DoubleVector): A

Create the Dot Product of two Vectors

Create the Dot Product of two Vectors

Value Params
that

Double

def magnitude: A

The scalar value of the Vector

The scalar value of the Vector

Subtract two Vectors

Subtract two Vectors

Value Params
that

Vector[A]

Creates the Unit Vector which corresponds to this vector

Creates the Unit Vector which corresponds to this vector

Add two Vectors

Add two Vectors

Value Params
that

Vector[A]

def times(that: Double): SVectorType

Scale a Vector

Scale a Vector

Value Params
that

Double

Concrete methods

def #*: DoubleVector => SVector[A]
def *(that: Double): SVectorType
def *(that: DoubleVector): A
def /(that: Double): SVectorType
def polar(coordinateX: Int, coordinateY: Int, unit: AngleUnit): (A, Angle)

The polar coordinates (r, theta) of the two Cartesian coordinates at the supplied indices

The polar coordinates (r, theta) of the two Cartesian coordinates at the supplied indices

Value Params
coordinateX

index of the abscissa coordinate (defaults to 0)

coordinateY

index of the ordinate coordinate (defaults to 1)

unit

unit for the angle (theta) component (defaults to Radians)

Returns

(A, Angle)