Vec

doodle.core.Vec
See theVec companion object
final case class Vec(x: Double, y: Double)

A 2D vector. We can't use the name Vector as Scala already uses it.

Attributes

Companion
object
Source
Vec.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def *(d: Double): Vec

Attributes

Source
Vec.scala
def +(that: Vec): Vec

Attributes

Source
Vec.scala
def -(that: Vec): Vec

Attributes

Source
Vec.scala
def /(d: Double): Vec

Attributes

Source
Vec.scala
def angle: Angle

Attributes

Source
Vec.scala
def cross(that: Vec): Double

Z-component of the cross product of this and that

Z-component of the cross product of this and that

Attributes

Source
Vec.scala
def dot(that: Vec): Double

Attributes

Source
Vec.scala
def left: Vec

Attributes

Source
Vec.scala
def length: Double

Attributes

Source
Vec.scala
def normalize: Vec

Attributes

Source
Vec.scala
def right: Vec

Attributes

Source
Vec.scala
def rotate(by: Angle): Vec

Attributes

Source
Vec.scala
def toPoint: Point

Attributes

Source
Vec.scala
def unary_-: Vec

Attributes

Source
Vec.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product