Spondee: math

A class set for wrapping units of measure in an application.

License

License

MIT
GroupId

GroupId

com.inkapplications.spondee
ArtifactId

ArtifactId

math-linuxmips32
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

klib
Description

Description

Spondee: math
A class set for wrapping units of measure in an application.
Project URL

Project URL

https://github.com/inkapplications/spondee
Source Code Management

Source Code Management

https://github.com/InkApplications/spondee

Download math-linuxmips32

Dependencies

compile (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-common jar 1.5.0

Project Modules

There are no modules declared in this project.

Spondee

A class set for wrapping units of measure in an application.

FAQ

What is this?

A collection of classes representing units of measure that can be used in an application.

Why not use a plain number type?

Plain numbers are often ambiguous. Consider the method:

fun setLight(brightness: Number)

What number would you pass in to set the light to half brightness?

Is this a comprehensive set of units?

Absolutely not. Feel free to add them.

What is the worst unit?

Bels.

Are these optimized for efficiency?

No. Math on these units are often done with Double precision. If this is a problem in your application, they can be converted to a plain number for efficiency. In reality, though, it's probably fine.

Design Rules

Here are some rules that are followed on this project. If you contribute, please follow them.

  • Units should be data classes
    • (These will eventually all be migrated to value class when stable)
  • All ambiguous math is done with the Double type
  • Direct wrapping is done with value extensions. (eg. 55.percent)
com.inkapplications.spondee

Ink Applications

Open source developer tools and web services.

Versions

Version
0.0.3