Sets a flag in a masked value based on the provided state.
Reference to the value where the flag will be modified.
The mask to apply to the value.
The flag to set or clear.
A boolean indicating whether to set or clear the flag.
See Implementation
Sets a flag in a masked value based on the provided state.