Skip to content

Instantly share code, notes, and snippets.

@ruurtjan
Created July 13, 2018 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruurtjan/fe1288eaf19a5802d2daa12b9722aaeb to your computer and use it in GitHub Desktop.
Save ruurtjan/fe1288eaf19a5802d2daa12b9722aaeb to your computer and use it in GitHub Desktop.
Learning linear algebra with Scala - matrix implicits sample
import VectorImplicits._
import model.{Matrix2, Vector2}
object MatrixImplicits {
implicit class ArithmeticMatrixImplicits(m: Matrix2) {
def *(m2: Matrix2): Matrix2 = ???
def *(scalar: Float): Matrix2 = ???
def determinant(): Float = ???
def changesOrientation(): Boolean = ???
def inverse(): Option[Matrix2] = ???
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment