The original number whose bit is being modified.
Zero-based bit position to update (0 = least-significant bit).
Boolean or numeric value indicating whether the bit should be set (true / 1)
or cleared (false / 0).
Generated using TypeDoc
Updates the bit at position
kin the given numbernto the specified value.The original number is not mutated; instead, a new number is returned with the bit updated.
Returns
A new number equal to
nwith bitkupdated.Example
Remarks
0orfalseresult in bit being set to1.