Physikal

Exension library to aid in unit conversion and handling.

Лицензия

Лицензия

Группа

Группа

org.tenkiv.physikal
Идентификатор

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

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

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

2.0.3.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Physikal
Exension library to aid in unit conversion and handling.
Система контроля версий

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

https://github.com/Tenkiv/Physikal.git

Скачать core

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.tenkiv.physikal/core/ -->
<dependency>
    <groupId>org.tenkiv.physikal</groupId>
    <artifactId>core</artifactId>
    <version>2.0.3.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.tenkiv.physikal/core/
implementation 'org.tenkiv.physikal:core:2.0.3.2'
// https://jarcasting.com/artifacts/org.tenkiv.physikal/core/
implementation ("org.tenkiv.physikal:core:2.0.3.2")
'org.tenkiv.physikal:core:jar:2.0.3.2'
<dependency org="org.tenkiv.physikal" name="core" rev="2.0.3.2">
  <artifact name="core" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.tenkiv.physikal', module='core', version='2.0.3.2')
)
libraryDependencies += "org.tenkiv.physikal" % "core" % "2.0.3.2"
[org.tenkiv.physikal/core "2.0.3.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
tec.units : indriya jar 1.0

runtime (2)

Идентификатор библиотеки Тип Версия
org.tenkiv.coral : coral jar 2.1.2.1
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.10

test (3)

Идентификатор библиотеки Тип Версия
io.kotlintest : kotlintest-runner-junit5 jar 3.1.8
io.kotlintest : kotlintest-core jar 3.1.8
io.kotlintest : kotlintest-assertions jar 3.1.8

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

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

Physikal  License Matrix

Physikal is a Kotlin units of measurement, physical computing, and dimension analysis library. Currently just extensions for Java units of measurement but we are planning for a Kotlin multiplatform rewrite.

Artifacts

Core SI Units Complete Units
JVM Maven Central Maven Central Maven Central

Usage

Create units

    val small = 10.metre
    
    val large = 10.kilo.metre

Includes all operators

    val added = 10.metre + 1.kilo.metre
    >> 1010.0 m
    
    val speed = added/10.minute 
    >> 101 m/min
    
    var aFewSeconds = 5.second
    aFewSeconds++
    >> 6.0 s
    
    10.peta.watt > 2.watt
    >> true
    
    5.gram <= 20.kilo.gram
    >> true
    
    (-10.nano.metre).abs()
    >> 10.0 nm
    
    ## The operator '==' does not always work reliably for quantities;
    ## the function qeq() should be used instead.
    1.kilo.gram == 1000.gram
    >> false
    
    1.kilo.gram qeq 1000.gram
    >> true

Using different units (SI units & other units)

    5.gram + 2.pound
    >> 912.18474 g
    
    (13.kilo.gram + 20.pound) convertTo STONE
    >> 3.47572100600243466674378 st

Future updates

Currently all quantities are reference types, so heavy usage of this library will involve some level of extraneous allocation and GC. Hopefully we can resolve this issue when / if Kotlin inline classes are expanded to support multiple properties.

Special thanks

org.tenkiv.physikal

Tenkiv

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

Версия
2.0.3.2
2.0.2.0
2.0.1.0
2.0.0.0
1.1.3.5
1.1.3.4
1.1.3.3
1.1.3.2
1.1.3.1
1.1.3.0
1.1.2.0
1.1.1.0
1.1.0.0
1.0.2.2
1.0.2.1
1.0.1.1
1.0.0.0
0.0.1.0