Skip to content

Commit

Permalink
Update basicTypes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Nov 22, 2023
1 parent 99164b2 commit 407d91d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basicTypes.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import base64,Buffer,errorHandler,os,pyrbxm,struct,sys,requests,robloxapi

def conditionalSet(condition,val1,val2):
if ((condition)==True):
return val1
else:
return val2
##endif
##end

def lrotate(n,d):
return (n << d)|(n >> (32 - d))
##end
def rrotate(n,d):
return (n >> d)|(n << (32 - d)) & 0xFFFFFFFF
##end

def transformInt(x):
return conditionalSet(x % 2 == 0,x / 2,-(x + 1) / 2)
##end
def rbxF32(x):
x=rrotate(x, 1)
return conditionalSet(x % 2 == 0,x / 2,-(x + 1) / 2)
return struct.unpack(">f", struct.pack(">I4", x))
##end
def String(buffer):
return buffer.read(buffer.readNumber("<I4"))
Expand Down

0 comments on commit 407d91d

Please sign in to comment.