mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-12-08 19:06:00 +00:00
Fix typo.
This commit is contained in:
parent
933848b215
commit
55ecc0b313
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user