evacchi / kuants

A Kotlin API for Quantities and Units of Measure inspired by Squants

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kuants

A Kotlin API for Quantities and Units of Measure inspired by Squants

Example:

    val x: Length = Meters(10.0)
    val y: Length = Meters(20.0)
    val z: Length = Meters(30.0)

    val area: Area = x * y
    println(area)

    val volume: Volume = x * y * z
    println(volume)

    println(volume to Litres)
    
    // val x = area + volume // type error!

About

A Kotlin API for Quantities and Units of Measure inspired by Squants


Languages

Language:Kotlin 100.0%