Difference between revisions of "User:PROXiCiDE/MathUtil"

Jump to navigation Jump to search
36 bytes removed ,  20:46, 27 April 2014
m
imported>PROXiCiDE
m (Categorized / Added Example for Bit Manipulation)
imported>PROXiCiDE
Line 137: Line 137:
; i = Bit_Set(i,5) = 101010000000000000000000000000
; i = Bit_Set(i,5) = 101010000000000000000000000000
Int Function Bit_MakeByte(Int aiIndex = 1)
Int Function Bit_MakeByte(Int aiIndex = 1)
aiIndex = ClampInt(aiIndex, 1, 30)
Int iPos = aiIndex % 30
Int iPos = aiIndex % 30
return Math.LeftShift(1, iPos)
Return Math.LeftShift(1, iPos)
EndFunction
EndFunction


Anonymous user

Navigation menu