Skip to content

Commit

Permalink
Merge pull request #95 from Micrograx/fix/from_int_little_endian_docu…
Browse files Browse the repository at this point in the history
…mentation_mixup
  • Loading branch information
KtorZ authored Oct 10, 2024
2 parents ab0dd72 + 1528e95 commit cc346f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/aiken/primitive/bytearray.ak
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ test from_int_big_endian_4() fail {
/// > size is _too large_, the array is right-padded with zeroes.
///
/// ```aiken
/// bytearray.from_int_big_endian(1_000_000, 3) == #"0f4240"
/// bytearray.from_int_big_endian(1_000_000, 5) == #"00000f4240"
/// bytearray.from_int_big_endian(0, 8) == #"0000000000000000"
/// bytearray.from_int_big_endian(1_000_000, 1) => 💥
/// bytearray.from_int_little_endian(1_000_000, 3) == #"40420f"
/// bytearray.from_int_little_endian(1_000_000, 5) == #"40420f0000"
/// bytearray.from_int_little_endian(0, 8) == #"0000000000000000"
/// bytearray.from_int_little_endian(1_000_000, 1) => 💥
/// ```
pub fn from_int_little_endian(self: Int, size: Int) -> ByteArray {
builtin.integer_to_bytearray(False, size, self)
Expand Down

0 comments on commit cc346f2

Please sign in to comment.