NVSE
NVSE copied to clipboard
add NumToBin, add opt arg for NumToHex, add binary conversion support…
… for ToNumber.
NumToBin syntax:
NumToBin num:int padToLengthWithLeadingZeros:int{Default:32} addPrefix:bool{Default:0}
The prefix is just for adding 0b
, which if added can now be read by ToNumber
to interpret the number as binary.
Also added this addPrefix
arg to NumToHex
, where it'll add 0x
. ToNumber
already supported reading numbers that started with 0x
, but there wasn't a convenient way to do that with just NumToHex
.