mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-09 04:08:42 +08:00
Fix typo.
This commit is contained in:
@ -11,6 +11,6 @@ export default function updateBit(number, bitPosition, bitValue) {
|
|||||||
// Init clear mask.
|
// Init clear mask.
|
||||||
const clearMask = ~(1 << bitPosition);
|
const clearMask = ~(1 << bitPosition);
|
||||||
|
|
||||||
// Cleat bit value and then set it up to required value.
|
// Clear bit value and then set it up to required value.
|
||||||
return (number & clearMask) | (bitValueNormalized << bitPosition);
|
return (number & clearMask) | (bitValueNormalized << bitPosition);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user