Vec

final case class Vec(x: Double, y: Double)

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

Companion:
object
Source:
Vec.scala
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def *(d: Double): Vec
Source:
Vec.scala
def +(that: Vec): Vec
Source:
Vec.scala
def -(that: Vec): Vec
Source:
Vec.scala
def /(d: Double): Vec
Source:
Vec.scala
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

Source:
Vec.scala
def dot(that: Vec): Double
Source:
Vec.scala
def left: Vec
Source:
Vec.scala
def right: Vec
Source:
Vec.scala
def rotate(by: Angle): Vec
Source:
Vec.scala
Source:
Vec.scala

Inherited methods

Inherited from:
Product