case class Position[P](x: P, y: P)(implicit evidence$1: Numeric[P]) extends Product with Serializable
Generic base class Position, holding the two ordinates
- P
Numeric type
- x
The abscissa
- y
The ordinate
- Alphabetic
- By Inheritance
- Position
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Position(x: P, y: P)(implicit arg0: Numeric[P])
- x
The abscissa
- y
The ordinate
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*(factor: P): Position[P]
Binaire multiply operator e,g.
Binaire multiply operator e,g. (a, b) * n=> (a * n, b * n)
-
def
*(p: Position[P]): Position[P]
Binaire multiply operator for two coordinates, multplies each of the ordinate
-
def
+(term: P): Position[P]
Binaire add operator e,g.
Binaire add operator e,g. (a, b) + n => (a + n, b + n)
-
def
+(p: Position[P]): Position[P]
Binaire add operator for two coordinates
-
def
-(term: P): Position[P]
Binaire subtract operator e,g.
Binaire subtract operator e,g. (a, b) - n => (a - n, b - n)
-
def
-(p: Position[P]): Position[P]
Binaire subtract operator for the difference of two coordinates
- def ->[B](y: B): (Position[P], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
areTouching(posB: Position[P], side: P): Boolean
Checks if two squares intersects
Checks if two squares intersects
- posB
Position of the second square
- side
side of both two squares
- returns
True if a intersection occurs
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def ensuring(cond: (Position[P]) ⇒ Boolean, msg: ⇒ Any): Position[P]
- def ensuring(cond: (Position[P]) ⇒ Boolean): Position[P]
- def ensuring(cond: Boolean, msg: ⇒ Any): Position[P]
- def ensuring(cond: Boolean): Position[P]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isValidPositionEl(canvasPos: Position[P], side: P): Boolean
Check if the square area is within the rectangle area
Check if the square area is within the rectangle area
- canvasPos
Position of the second square
- side
side of both two squares
- returns
False if a square out of bound
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val x: P
- val y: P
- def →[B](y: B): (Position[P], B)
Shadowed Implicit Value Members
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from Position[P] to any2stringadd[Position[P]] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(position: any2stringadd[Position[P]]).+(other)
- Definition Classes
- any2stringadd
This is the documentation for a simple HTML5 Canvas game written in Scala, and cross compiled to run in the browser targeting the HTML5 Canvas.
See also:
Package structure
Notable packages include:
nl.amsscala.simplegame