final class Pt2 extends Vec2Like with ProdDbl2
A 2 dimensional point. It can be used to for translations of 2 dimensional points. Thanks to Rene Descarte for this.
- Alphabetic
- By Inheritance
- Pt2
- ProdDbl2
- ProdHomo
- SpecialT
- Product2
- Product
- Equals
- Vec2Like
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(operand: Vec2): Pt2
Add the operand Vec2 2D vector to this Pt2, returns a new Pt2.
- def -(operand: Vec2): Pt2
Subtracts the operand Vec2 2D vector from this 2D point.
- def <<(startPt: Pt2): Vec2
Subtracts the operand 2D point from this 2D point to get the relative Vector.
Subtracts the operand 2D point from this 2D point to get the relative Vector. Returns a Vec2.
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >>(operand: Pt2): Vec2
Subtracts this 2D point from the operand 2D point to get the relative Vector.
Subtracts this 2D point from the operand 2D point to get the relative Vector. Returns a Vec2.
- def _1: Double
- Definition Classes
- Pt2 → Product2
- Annotations
- @inline()
- def _2: Double
- Definition Classes
- Pt2 → Product2
- Annotations
- @inline()
- def addX(adj: Double): Pt2
- def addXY(otherX: Double, otherY: Double): Pt2
- def addY(adj: Double): Pt2
- def angleFrom(operand: Pt2): Angle
Gives the anlge from the operand point to this point.
- def angleTo(operand: Pt2): Angle
Gives the angle from this point to the operand point.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(other: Any): Boolean
- Definition Classes
- Pt2 → Equals
- def centreSquare(length: Double): PolygonImp
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def distTo(operand: Pt2): Double
Gives the positive scalar distance between this and the operand Vec2.
- def dot(operand: Vec2Like): Double
The dot product of this and the operand vector.
The dot product of this and the operand vector.
- Definition Classes
- Vec2Like
- Annotations
- @inline()
- def doublesSeq: Seq[Double]
- Definition Classes
- Vec2Like
- def drawCross(armLength: Double, lineColour: Colour, lineWidth: Double): LinesDraw
Not sure about this method
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- Pt2 → Equals → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def invScale(divisor: Double): Pt2
- Annotations
- @inline()
- def invSlate(operand: Pt2): Pt2
Changes the origin of the point to the new point.
Changes the origin of the point to the new point. Subtracting the X and Y components of the operand point from this point.
- def inverseY: Pt2
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
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lineAlong(angle: Angle, magnitude: Double): LineSeg
Line segment from this point to along the given angle for the given magnitude to point 2.
- def lineFrom(pt2: Pt2): LineSeg
Line segment LineSeg from the parameter point to this point.
- def lineTo(pt2: Pt2): LineSeg
Line segment LineSeg from this point to the parameter point.
- def linesCross(armLength: Double = 5): Seq[LineSeg]
- def mid(point2: Pt2): Pt2
The average of this and the operand Pt2.
The average of this and the operand Pt2. The mid point between this point and the operand second point.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negX: Pt2
Reflects, mirrors along the Y axis by negating X.
- def negY: Pt2
Reflects ,mirrors along the X axis by negating Y.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def pp(z: Double): Pt3
- def productArity: Int
- Definition Classes
- Product2 → Product
- def productElement(n: Int): Any
- Definition Classes
- Product2 → Product
- Annotations
- @throws(classOf[java.lang.IndexOutOfBoundsException])
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def productPrefix: String
- Definition Classes
- Pt2 → Product
- def prolign(m: ProlignMatrix): Pt2
- Annotations
- @inline()
- def reflect(lineLike: LineLike): Pt2
Reflects or mirrors this Vec2 across a line, returning new Vec2.
- def reflectXLine(line: XLine): Pt2
Reflects, mirrors this Vec2 across an XLine.
- def reflectXParallel(yOffset: Double): Pt2
Reflects, mirrors along the y = yOffset line that is parallel to the X axis.
- def reflectYLine(line: YLine): Pt2
Reflects, mirrors this Vec2 across a YLine.
- def reflectYParallel(xOffset: Double): Pt2
Reflects, mirrors along the x = xOffset line, that is parallel to the Y axis by negating X.
- def rotate(a: AngleVec): Pt2
Rotates this vector through the given angle around the origin.
- def rotate180: Pt2
Rotates the vector 180 degrees or Pi radians.
- def rotate270: Pt2
rotates the vector 90 degrees or Pi/2 radians, clockwise.
- def rotate90: Pt2
rotates the vector 90 degrees or Pi/2 radians, anticlockwise.
- def rotateAbout(centre: Pt2, a: AngleVec): Pt2
Rotates this vector through the given angle around the centre of rotation passed as the first parameter.
- def rotateRadians(r: Double): Pt2
- def scale(factor: Double): Pt2
- def slate(operand: Vec2Like): Pt2
2D geometric translation transofrmation on this Pt2 returns a Pt2.
- def slate(xOperand: Double, yOperand: Double): Pt2
2D geometric translation transofrmation on this Pt2 returns a Pt2.
- def str0: String
- def str1: String
- def str2: String
- def str3: String
- def strMod(f: (Double) => String): String
- def subX(adj: Double): Pt2
- def subXY(otherX: Double, otherY: Double): Pt2
- def subY(adj: Double): Pt2
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def textAt(str: String, fontSize: Int, fontColour: Colour = Colour.Black): TextGraphic
- def toDist2(factor: Dist): Dist2
- Annotations
- @inline()
- 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
- def toPair: (Double, Double)
- Definition Classes
- Vec2Like
- def toString(): String
- Definition Classes
- Pt2 → AnyRef → Any
- def toText(fontSize: Int = 10, fontColour: Colour = Colour.Black): TextGraphic
- def toTuple: (Double, Double)
- def toVec: Vec2
Returns the Vec2 2D vector from the origin to this Pt2.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val x: Double
- def xScale(factor: Double): Pt2
- def xShear(operand: Double): Pt2
- def xyScale(xOperand: Double, yOperand: Double): Pt2
- val y: Double
- def yScale(factor: Double): Pt2
- def yShear(operand: Double): Pt2