Spondee: math

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

Лицензия

Лицензия

MIT
Группа

Группа

com.inkapplications.spondee
Идентификатор

Идентификатор

math-mingwx64
Последняя версия

Последняя версия

0.0.3
Дата

Дата

Тип

Тип

klib
Описание

Описание

Spondee: math
A class set for wrapping units of measure in an application.
Ссылка на сайт

Ссылка на сайт

https://github.com/inkapplications/spondee
Система контроля версий

Система контроля версий

https://github.com/InkApplications/spondee

Скачать math-mingwx64

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib-common jar 1.5.0

Модули Проекта

Данный проект не имеет модулей.

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.

Версии библиотеки

Версия
0.0.3