Skip to content

Commit

Permalink
Update Chunks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Dec 4, 2023
1 parent be91330 commit 8d18f19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ def createTable(length,val):
##end
return arr
##end
def extract(number, field, width):
width=conditionalSet(width!=None,width,1)
mask = (1 << width) - 1
return (number >> field) & mask
##end
def conditionalSet(condition,val1,val2):
if ((condition)==True):
return val1
else:
return val2
##endif
##end
def extract(number, field, width):
width=conditionalSet(width!=None,width,1)
mask = (1 << width) - 1
return (number >> field) & mask
##end
def VirtualInstance(classID, className, ref):
class vi:
ClassId=classID
Expand Down

0 comments on commit 8d18f19

Please sign in to comment.