mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-07 01:44:52 +08:00
Fix typo.
This commit is contained in:
@ -11,6 +11,6 @@ export default function updateBit(number, bitPosition, bitValue) {
|
||||
// Init clear mask.
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user