- Home /
Question by
bingomanatee · Feb 12, 2012 at 04:46 AM ·
shiftbitwise
Where is the >>>> bitwise zerofill shift?
There seems to be no bitwise zerofill shifter >>> in UnityScript. Is there a funtional equivalent to this somewhere? Thanks...
Comment
Answer by Owen-Reynolds · Feb 12, 2012 at 04:25 PM
Each shift right is just division by 2. Shifting by 3 is the same as integer division by 2^3:
// var res : int = x >> shiftBy;
var res : int = x / Mathf.pos(2, shiftBy);
That's not really the answer he was looking for, it is indeed information that is correct nonetheless.
Your answer
![](https://koobas.hobune.stream/wayback/20220613064010im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Bitwise Operators 3 Answers
GUILayout items draw regardless of "IF" statements 1 Answer
Preventing Items from shifting in a list 1 Answer
Heres a Script for SloMo hold left shift 3 Answers