Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

unsigned support for Kotlin via boxed types and unsigned operators

License

NotificationsYou must be signed in to change notification settings

kotlin-graphics/kotlin-unsigned

Repository files navigation

Build StatuslicenseSizeGithub All Releases

Unsigned operators and boxed types (U8,U16,U32 andU64) for unsigned support.

To have a quick idea what this library offers, take a look at the tests

Differences with kotlin stdlib:

  • this project uses classes instead inline classes. To address this in critical scenarios where allocations may have a sensitive impact, primitive variable holding the unsignedtype value is avar, so you can re-use the same instance over and over again
  • unsigned types extendNumber abstract class
  • automatic conversions
  • it is possible to get a string representation with a specific format by calling the correspondingtoString(format: String) method, eg:ubyte.format("%08x")
  • all the unsigned types implement all the function, includingshl andshr forUbyte andUshort
  • there is no automatic padding to integer for unsigned bytes and shorts, so if you add anUshort to anotherUshort you get anUshort (and not anUint)

Install:

mary

repositories {    maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")// or with magik plugin//github("kotlin-graphics/mary")}dependencies {    implementation("kotlin.graphics:unsigned:3.3.32")}

maven central

dependencies {    implementation("io.github.kotlin-graphics:kotlin-unsigned:3.3.32")}

You can find more info bymary

Contributions:

Don't hesitate to contribute to the project by submittingissues orpull requests for bugs and features. Any feedback is welcome atelect86@gmail.com.

Credits:

Deploys by Netlify

About

unsigned support for Kotlin via boxed types and unsigned operators

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors6

Languages


[8]ページ先頭

©2009-2025 Movatter.jp