mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Improved docs (#708)
* начало переписи доков * extensions update * libapp update * libfile update * io_stream update * Update io_stream.md * io_stream update x3 * io_stream update x4 * libtime update * libgui update + make bytearray.md * libinput update * Update libapp.md * Update libapp.md * libgui update * events.md ru fix * да ну не надо так делать --> не имеет смысла, ибо гитхаб -> показывает адекватно * types refactoring * fixes * Update libblock.md * Update libblock.md * Update libbyteutil.md
This commit is contained in:
parent
8b31bdeb78
commit
ac02bc0c8e
43 changed files with 1107 additions and 1314 deletions
|
|
@ -13,7 +13,7 @@ function bit_converter.string_to_bytes(str: string) -> table
|
|||
Конвертирует строку в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.bool_to_byte(bool: boolean) -> integer
|
||||
function bit_converter.bool_to_byte(bool: boolean) -> int
|
||||
```
|
||||
Конвертирует логический булев в байт
|
||||
|
||||
|
|
@ -28,27 +28,27 @@ function bit_converter.float64_to_bytes(float: number, [опционально]
|
|||
Конвертирует плавающее значение двойной точности в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.uint16_to_bytes(int: integer, [опционально] order: string) -> table
|
||||
function bit_converter.uint16_to_bytes(int: int, [опционально] order: string) -> table
|
||||
```
|
||||
Конвертирует беззнаковое 2-х байтовое целое число в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.uint32_to_bytes(int: integer, [опционально] order: string) -> table
|
||||
function bit_converter.uint32_to_bytes(int: int, [опционально] order: string) -> table
|
||||
```
|
||||
Конвертирует беззнаковое 4-х байтовое целое число в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.sint16_to_bytes(int: integer, [опционально] order: string) -> table
|
||||
function bit_converter.sint16_to_bytes(int: int, [опционально] order: string) -> table
|
||||
```
|
||||
Конвертирует знаковое 2-х байтовое целое число в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.sint32_to_bytes(int: integer, [опционально] order: string) -> table
|
||||
function bit_converter.sint32_to_bytes(int: int, [опционально] order: string) -> table
|
||||
```
|
||||
Конвертирует знаковое 4-х байтовое целое число в байты
|
||||
|
||||
```lua
|
||||
function bit_converter.int64_to_bytes(int: integer, [опционально] order: string) -> table
|
||||
function bit_converter.int64_to_bytes(int: int, [опционально] order: string) -> table
|
||||
```
|
||||
Конвертирует знаковое 8-и байтовое целое число в байты
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ function bit_converter.bytes_to_string(bytes: table) -> string
|
|||
Конвертирует массив байтов в строку
|
||||
|
||||
```lua
|
||||
function bit_converter.byte_to_bool(byte: integer) -> boolean
|
||||
function bit_converter.byte_to_bool(byte: int) -> boolean
|
||||
```
|
||||
Конвертирует байт в логическое булевое значение
|
||||
|
||||
|
|
@ -73,26 +73,26 @@ function bit_converter.bytes_to_float64(bytes: table|Bytearray, [опциона
|
|||
Конвертирует массив байтов в плавающее число двойной точности
|
||||
|
||||
```lua
|
||||
function bit_converter.bytes_to_uint16(bytes: table|Bytearray, [опционально] order: string) -> integer
|
||||
function bit_converter.bytes_to_uint16(bytes: table|Bytearray, [опционально] order: string) -> int
|
||||
```
|
||||
Конвертирует массив байтов в 2-х байтовое беззнаковое число
|
||||
|
||||
```lua
|
||||
function bit_converter.bytes_to_uint32(bytes: table|Bytearray, [опционально] order: string) -> integer
|
||||
function bit_converter.bytes_to_uint32(bytes: table|Bytearray, [опционально] order: string) -> int
|
||||
```
|
||||
Конвертирует массив байтов в 4-х байтовое беззнаковое число
|
||||
|
||||
```lua
|
||||
function bit_converter.bytes_to_sint16(bytes: table|Bytearray, [опционально] order: string) -> integer
|
||||
function bit_converter.bytes_to_sint16(bytes: table|Bytearray, [опционально] order: string) -> int
|
||||
```
|
||||
Конвертирует массив байтов в 2-х байтовое знаковое число
|
||||
|
||||
```lua
|
||||
function bit_converter.bytes_to_sint32(bytes: table|Bytearray, [опционально] order: string) -> integer
|
||||
function bit_converter.bytes_to_sint32(bytes: table|Bytearray, [опционально] order: string) -> int
|
||||
```
|
||||
Конвертирует массив байтов в 4-х байтовое знаковое число
|
||||
|
||||
```lua
|
||||
function bit_converter.bytes_to_int64(bytes: table|Bytearray, [опционально] order: string) -> integer
|
||||
function bit_converter.bytes_to_int64(bytes: table|Bytearray, [опционально] order: string) -> int
|
||||
```
|
||||
Конвертирует массив байтов в 8-х байтовое знаковое число
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function data_buffer:set_order(order: string)
|
|||
Должен равняться одному из перечисленных в [**bit_converter**](core_bit_converter.md)
|
||||
|
||||
```lua
|
||||
function data_buffer:put_byte(byte: integer)
|
||||
function data_buffer:put_byte(byte: int)
|
||||
```
|
||||
Записывает байт в буффер
|
||||
|
||||
|
|
@ -50,27 +50,27 @@ function data_buffer:put_float64(float: number)
|
|||
Конвертирует плавающее число двойной точности в байты и записывает их в буффер
|
||||
|
||||
```lua
|
||||
function data_buffer:put_uint16(int: integer)
|
||||
function data_buffer:put_uint16(int: int)
|
||||
```
|
||||
Конвертирует беззнаковое 2-х байтовое число в байты и записывает их в буффер
|
||||
|
||||
```lua
|
||||
function data_buffer:put_uint32(int: integer)
|
||||
function data_buffer:put_uint32(int: int)
|
||||
```
|
||||
Конвертирует беззнаковое 4-х байтовое число в байты и записывает их в буффер
|
||||
|
||||
```lua
|
||||
function data_buffer:put_sint16(int: integer)
|
||||
function data_buffer:put_sint16(int: int)
|
||||
```
|
||||
Конвертирует знаковое 2-х байтовое число в байты и записывает их в буффер
|
||||
|
||||
```lua
|
||||
function data_buffer:put_sint32(int: integer)
|
||||
function data_buffer:put_sint32(int: int)
|
||||
```
|
||||
Конвертирует знаковое 4-х байтовое число в байты и записывает их в буффер
|
||||
|
||||
```lua
|
||||
function data_buffer:put_int64(int: integer)
|
||||
function data_buffer:put_int64(int: int)
|
||||
```
|
||||
Конвертирует знаковое 8-и байтовое число в байты и записывает их в буффер
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ sint32 = 8
|
|||
```
|
||||
|
||||
```lua
|
||||
function data_buffer:get_byte() -> integer
|
||||
function data_buffer:get_byte() -> int
|
||||
```
|
||||
Возвращает следующий байт из буффера
|
||||
|
||||
|
|
@ -121,27 +121,27 @@ function data_buffer:get_float64() -> number
|
|||
Читает следующее плавающее число двойной точности из буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:get_uint16() -> integer
|
||||
function data_buffer:get_uint16() -> int
|
||||
```
|
||||
Читает следующее 2-х байтовое беззнаковое целое число из буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:get_uint32() -> integer
|
||||
function data_buffer:get_uint32() -> int
|
||||
```
|
||||
Читает следующее 4-х байтовое беззнаковое целое число из буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:get_sint16() -> integer
|
||||
function data_buffer:get_sint16() -> int
|
||||
```
|
||||
Читает следующее 2-х байтовое знаковое целое число из буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:get_sint32() -> integer
|
||||
function data_buffer:get_sint32() -> int
|
||||
```
|
||||
Читает следующее 4-х байтовое знаковое целое число из буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:get_int64() -> integer
|
||||
function data_buffer:get_int64() -> int
|
||||
```
|
||||
Читает следующее 8-х байтовое знаковое целое число из буффера
|
||||
|
||||
|
|
@ -151,12 +151,12 @@ function data_buffer:get_number() -> number
|
|||
Читает следующее число (см. data_buffer:put_number)
|
||||
|
||||
```lua
|
||||
function data_buffer:size() -> integer
|
||||
function data_buffer:size() -> int
|
||||
```
|
||||
Возвращает размер буффера
|
||||
|
||||
```lua
|
||||
function data_buffer:set_position(integer: pos)
|
||||
function data_buffer:set_position(int: pos)
|
||||
```
|
||||
Устанавливает текущую позицию в буффере
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue