KorMA

KorMA

Korma is a mathematic library for multiplatform Kotlin 1.3 mostly focused on geometry.

https://github.com/korlibs/korma

Star

Build Status Maven Version

Table of contents:

Pages

  •  Geometry - Angle, Point, Matrix, Ray, Vector3D, Matrix3D, AABB3D, Ray3D, EulerRotation, Quaternion, PointArrayList, Rectangle, Size, Anchor, Orientation, ScaleMode, BoundsBuilder, BVH, BVH2D, BVH3D...
  •  Vector - VectorPath, VectorBuilder, Shape2d, Shape2d union, difference, Triangulation, Vector Collision, Bezier...
  •  Math Utils - Clamping, interpolation and easing
  •  BinPacking - Bin Packing, MaxRects...
  •  Path Finding - A*, TriA* path finding algorithms

Using with gradle

Requires Gradle 7.1.1 (JVM 8~13) for building and Kotlin >=1.5.20 for running:

build.gradle.kts

val kormaVersion = "2.2.0"

// For multiplatform projects
kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("com.soywiz.korlibs.korma:korma:$kormaVersion") 
            }
        }
    }
}

dependencies {
    // For JVM only
    implementation("com.soywiz.korlibs.korma:korma-jvm:$kormaVersion") 
    // For Android only
    implementation("com.soywiz.korlibs.korma:korma-android:$kormaVersion") 
    // For JS only
    implementation("com.soywiz.korlibs.korma:korma-js:$kormaVersion") 
}

Clipper & poly2tri

// Additional funcionality using Clipper and poly2try code (with separate licenses):
// - https://github.com/korlibs/korma/blob/master/korma-shape/LICENSE
dependencies {
    implementation "com.soywiz.korlibs.korma:korma-shape:$kormaVersion"
}