UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

38 lines (19 loc) 608 B
[**Kvaser CanKing GUI Extensions SDK v7.5.1**](../../README.md) *** [Kvaser CanKing GUI Extensions SDK](../../modules.md) / [models](../README.md) / decimalToHex # Function: decimalToHex() > **decimalToHex**(`d`, `padding?`, `prefix?`): `string` Converts a decimal number to a hexadecimal string. ## Parameters ### d `number` The number to convert. ### padding? `number` = `2` Number of hexadecimal digits in the returned value, the result will be padded with zeroes. ### prefix? `boolean` = `false` True if a 0x prefix should be added. ## Returns `string` The hexadecimal formatted value.