Skip to content

Commit 1181ae3

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 335438a + f3a507a commit 1181ae3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ Unsigned operators and boxed types (`Ubyte`, `Uint`, `Ulong` and `Ushort`) for u
1111

1212
To have a quick idea what this library offers, take a look at the [tests](https://github.com/kotlin-graphics/kotlin-unsigned/blob/master/src/test/kotlin/unsigned/test.kt)
1313

14+
### Differences with kotlin stdlib:
15+
16+
- this project uses classes instead inline classes. To address this in critical scenarios where allocations may have a sensitive impact, primitive variable holding the utype value is a `var`, so you can re-use the same istance over and over again
17+
- utypes extend `Number` abstract class
18+
- automatic conversions
19+
- it is possible to string format by calling the corresponding `format()` method, eg: `ubyte.format("%08x")`
20+
- all the utypes implement all the function, including `shl` and `shr` for `Ubyte` and `Ushort`
21+
- if you add an `Ushort` to another `Ushort` you get an `Ushort` (and not an `Uint)
22+
- no unsigned arrays supported yet
23+
1424
### How to get it:
1525

1626
[Gradle](https://jitpack.io/#kotlin-graphics/kotlin-unsigned/v2.1)

0 commit comments

Comments
 (0)