Packages

final class Vec2 extends ProdDbl2

A 2 dimensional vector, can be used to represent 2 dimensional points and translations of 2 dimensional points. Thanks to Rene Descarte this was a great idea.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Vec2
  2. ProdDbl2
  3. ProdHomo
  4. Product2
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Vec2(x: Double, y: Double)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *(factor: Double): Vec2
    Annotations
    @inline()
  4. def +(other: Vec2): Vec2
  5. def -(other: Vec2): Vec2
  6. def /(divisor: Double): Vec2
    Annotations
    @inline()
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def _1: Double
    Definition Classes
    Vec2 → Product2
    Annotations
    @inline()
  9. def _2: Double
    Definition Classes
    Vec2 → Product2
    Annotations
    @inline()
  10. def addX(adj: Double): Vec2
  11. def addXY(otherX: Double, otherY: Double): Vec2
  12. def addY(adj: Double): Vec2
  13. def angle: Angle
  14. def arcControlPoint(pt2: Vec2, arcCentre: Vec2): Vec2
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def canEqual(other: Any): Boolean
    Definition Classes
    Vec2 → Equals
  17. def centreSquare(length: Double): Polygon
  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  19. def distanceFrom(other: Vec2): Double
  20. def doublesSeq: Seq[Double]
  21. def drawCross(armLength: Double, lineColour: Colour, lineWidth: Double): LinesDraw

    Not sure about this method

  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(other: Any): Boolean
    Definition Classes
    Vec2 → Equals → AnyRef → Any
  24. def fillText(str: String, fontSize: Int, fontColour: Colour = Colour.Black): TextGraphic
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def inverseY: Vec2

    Reverses the y coordinate.

    Reverses the y coordinate. Useful for translating between canvases where the y axis measures down and coordinate systems where y is up

  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. def linesCross(armLength: Double = 5): Seq[Line2]
  31. def magnitude: Double
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def negX: Vec2

    Mirrors along the Y axis by negating X.

  34. def negY: Vec2

    Mirrors along the X axis by negating Y.

  35. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. def productArity: Int
    Definition Classes
    Product2 → Product
  38. def productElement(n: Int): Any
    Definition Classes
    Product2 → Product
    Annotations
    @throws(classOf[java.lang.IndexOutOfBoundsException])
  39. def productElementName(n: Int): String
    Definition Classes
    Product
  40. def productElementNames: Iterator[String]
    Definition Classes
    Product
  41. def productIterator: Iterator[Any]
    Definition Classes
    Product
  42. def productPrefix: String
    Definition Classes
    Product
  43. def rectVerts(width: Double, height: Double): Seq[Vec2]
  44. def rotate(a: Angle): Vec2

    This sure looks right

  45. def rotateRadians(r: Double): Vec2
  46. def scaleX(factor: Double): Vec2
  47. def scaleY(factor: Double): Vec2
  48. def str1: String
  49. def str2: String
  50. def str3: String
  51. def strMod(f: (Double) => String): String
  52. def subX(adj: Double): Vec2
  53. def subXY(otherX: Double, otherY: Double): Vec2
  54. def subY(adj: Double): Vec2
  55. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  56. def toLatLong(radius: Double): LatLong

    Where xnd y is a map on the surface ofa sphere.

    Where xnd y is a map on the surface ofa sphere. Currently not working for angles greater than Pi / 2

  57. def toLine(angle: Angle, length: Double): Line2
  58. def toPair: (Double, Double)
  59. def toString(): String
    Definition Classes
    Vec2 → AnyRef → Any
  60. def toTuple: (Double, Double)
  61. def unary_-: Vec2
  62. def vv(z: Double): Vec3
  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  66. def withinRect(target: Vec2, width: Double, height: Double): Boolean
  67. val x: Double
  68. val y: Double

Inherited from ProdDbl2

Inherited from ProdHomo

Inherited from Product2[Double, Double]

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped