From 8d18f196062cee305694379db6fbdbcca0c136cb Mon Sep 17 00:00:00 2001 From: Anonymous <84868516+Captian-obvious@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:50:32 -0500 Subject: [PATCH] Update Chunks.py --- Chunks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Chunks.py b/Chunks.py index 869fb37..a6b1a9a 100644 --- a/Chunks.py +++ b/Chunks.py @@ -6,11 +6,6 @@ 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 @@ -18,6 +13,11 @@ def conditionalSet(condition,val1,val2): 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