Mirror of Gitlab Repository

Overview

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

You might also like...
Mirror of https://git.ffmpeg.org/ffmpeg.git

FFmpeg README FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata. Librar

I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process.

Json2Java I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process. What this tool can do right

GitTouch - An built with Flutter open-source app for GitHub, GitLab, Bitbucket, Gitea and Gitee(码云),
GitTouch - An built with Flutter open-source app for GitHub, GitLab, Bitbucket, Gitea and Gitee(码云),

GitTouch - An built with Flutter open-source app for GitHub, GitLab, Bitbucket, Gitea and Gitee(码云)

A Kotlin Script which Auto-Create And Assign Gitlab MergeRequests

A Kotlin Script which create merge request automatically and assign it to a developer for review based on a startegy(Currently Queue).

A small bot for gitlab notification

Welcome to gitty 👋 A small bot for gitlab notification with integration on different platform Usage You gotta change variables in .env on your own do

A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

Repository that showcases 3 Android app architectures:
Repository that showcases 3 Android app architectures: "Standard Android", MVP and MVVM. The exact same app is built 3 times following the different patterns.

Archi This repository showcases and compares different architectural patterns that can be used to build Android apps. The exact same sample app is bui

:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

This Repository simplifies working with RecyclerView Adapter

AutoAdapter This Repository simplifies working with RecyclerView Adapter Gradle: Add it in your root build.gradle at the end of repositories: allproj

❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin)  architecture.
❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.

MarvelHeroes MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture. Fetching data from the network

🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.
🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.

DisneyMotions A demo Disney app using transformation motions based on MVVM architecture. The motion system is included in the 1.2.0-alpha05 released m

SocialAuth repository which contains socialauth android version and samples
SocialAuth repository which contains socialauth android version and samples

SocialAuth Android is an Android version of popular SocialAuth Java library. Now you do not need to integrate multiple SDKs if you want to integrate y

❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin)  architecture.
❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.

MarvelHeroes MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture. Fetching data from the network

🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.
🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.

DisneyMotions A demo Disney app using transformation motions based on MVVM architecture. The motion system is included in the 1.2.0-alpha05 released m

Repository for android animations Rx wrapper

RxAnimations RxAnimations is a library with the main goal to make android animations more solid and cohesive. Download compile 'oxim.digital:rxanim:

Repository with source code from http://rosettacode.org/wiki/Category:Kotlin

Rosetta Code Kotlin This is a repository with the Kotlin source code from RosettaCode wiki. The main motivation for extracting all the code into a rep

Clone of the mercurial repository http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar

ZBAR BAR CODE READER ==================== ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as v

A repository full of Forge 1.8.9 Kotlin utilities

kotlin-forge-api kotlin-forge-api is a repository full of different APIs to be used by mods for Forge 1.8.9 to make modding easier! Warning! To use an

Comments
  • Upgraded to Indriya 1.0

    Upgraded to Indriya 1.0

    When I prepared my KUG talk and ran Scratch files for each of the README examples, I stumbled across problems with uom-systems dependencies and underlying calls. Not sure, why it did not show in the build, but some of them only seem to occur at runtime. As 0.9 of both si-units and all uom-systems was released on top of Indriya 1.0 I migrated everything to the Indriya version (still JSR 363)

    I proposed a new version 1.1.4.0.

    opened by keilw 6
  • chore: remove parent pom depdendencies, which break maven consumers

    chore: remove parent pom depdendencies, which break maven consumers

    The way Physikal is currently packaged on maven central, the pom e.g. of si-units-1.1.1.0 currently includes:

        <dependency>
          <groupId>si.uom</groupId>
          <artifactId>si-parent</artifactId>
          <version>0.7.1</version>
          <scope>compile</scope>
        </dependency>
    

    This breaks consumers of Physikal using maven to build:

    [ERROR] Failed to execute goal on project model-nosql: Could not resolve dependencies for project de.xxx.core:model-nosql:jar:0.9: The following artifacts could not be resolved: systems.uom:systems-parent:jar:0.7.2, si.uom:si-parent:jar:0.7.1: Failure to find systems.uom:systems-parent:jar:0.7.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
    

    I think the situation si somewhat similar to https://stackoverflow.com/questions/27110014/could-not-find-artifact-in-maven-central-repo-when-search-returns-a-match

    In any case, I believe the parent pom is not necessary as a direct dependency. I confirm I can build and consume phyiskal to my local repo just fine using the change in this PR.

    opened by JohannesRudolph 1
  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    Tenkiv/Physikal now has a Chat Room on Gitter

    @ejberry has just created a chat room. You can visit it here: https://gitter.im/Tenkiv/Physikal.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

    opened by gitter-badger 0
Android project setup files when developing apps from scratch. The codebase uses lates jetpack libraries and MVVM repository architecture for setting up high performance apps

Android architecture app Includes the following Android Respository architecture MVVM Jepack libraries Carousel view Kotlin Kotlin Flow and Livedata P

null 2 Mar 31, 2022
This repository contains the source code for the PokeApi Android app.

PokeApi App This repository contains the source code for the PokeApi Android app.

Nilton Huamaní Carlos 0 Nov 4, 2021
This repository is part of a Uni-Project to write a complete Compiler for a subset of Java.

Compiler This repository is part of a Uni-Project to write a complete Compiler for a subset of Java. Features error recovery using context sensitive a

null 3 Jan 10, 2022
Example of migrating from Dagger to Hilt with a real service/repository example

DaggerToHilt Overview This repo provides a real example of using Hilt for dependency injection. It hits endpoints provided by the Movie Database, and

null 0 Nov 29, 2021
AndroidappTemplate - A GitHub template repository intended to kickstart development on an Android application

Android App Template This is a GitHub template repository intended to kickstart

null 0 Jan 7, 2022
This repository contains the article describing my attempt to implement a simple state reducer based on Kotlin Flow and an example app that uses it.

This repository contains the article describing my attempt to implement a simple state reducer based on Kotlin Flow and an example app that uses it.

Maciej Sady 18 Dec 29, 2022
Repository of a multi-platform application running the same Compose source code on all platforms

Compose multiplatform demo demo.mov Using the same compose user interface (UI) from android on all principal platforms ?? ?? App Features This is a si

David Coronel 18 Dec 16, 2022
A Gradle plugin for Kotlin Multiplatform projects that generate a XCFramework for Apple targets or a FatFramework for iOS targets, and manages the publishing process in a CocoaPod Repository.

KMP Framework Bundler KMP Framework Bundler is a Gradle plugin for Kotlin Multiplatform projects that generate a XCFramework for Apple targets or a Fa

Marco Gomiero 17 Oct 29, 2022
[Android-Kotlin] MVVM, ViewModel, LiveData, Observer, DataBinding, Repository, Retrofit, Dagger example

SimpleMvvmDaggerKotlin [Android-Kotlin] MVVM, ViewModel, LiveData, Observer, DataBinding, Repository, Retrofit, Dagger example [Image1 : User informat

DONGGEUN JUNG 2 Oct 24, 2022
Android application powering the mirror in my house

HomeMirror Android application powering the mirror in my house Google Play Link Software Day, time, and weather display Birthday messages Chore remind

Hannah Mittens Morrison 7.9k Dec 30, 2022