Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


(or Yet Another Scala Units Library)

scunits is an experimental, extensible library for type-checking dimensional quantities and handling units of measure in scala. Exponents of base quantities (mass, time, etc.) are stored at the type-level in recursive list structures similar to shapeless's hlists, but without any run-time instances. All measurements are stored as Doubles of their appropriate SI unit and only converted to a specific unit when needed.


  • Type safe comparisons, arithmetic and more.
  • All measurements (Scalar) are Value Classes wrapping Doubles. Performance is identical to Doubles once the JIT is warm.
  • New base quantities may be added.
  • Dimensions (Dims), units (UnitM) and measurements (Scalar) may be composed by multiplication and division
  • All SI prefixes (kilo, centi, etc.)
  • Array wrappers (ArrayM) for unboxed arrays
  • < 200k jar file size (for now...)
  • No dependencies
  • Reasonable compilation times:

Using scunits


Getting scunits

scunits is not curretly in a maven repository. You'll have to git clone, run sbt publish-local, then add "org.scunits" %% "core" % "0.0.2-SNAPSHOT" to your project dependencies.

You can’t perform that action at this time.