Skip to content

Commit

Permalink
return decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Dec 2, 2023
1 parent d48db96 commit 61ae692
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sizebot/lib/quake.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ def mag_to_name(mag: float) -> str:
def scale_to_joules(user: User, g: float, factor: float) -> Decimal:
return (Decimal(user.weight / 1000) / 2) * (Decimal(g) * Decimal(user.scale)) * Decimal(factor)

def step_joules(user: User) -> int:
def step_joules(user: User) -> Decimal:
return scale_to_joules(user, G, STEP_FACTOR)

def stomp_joules(user: User) -> int:
def stomp_joules(user: User) -> Decimal:
return scale_to_joules(user, STOMP_G, STOMP_FACTOR)

def jump_joules(user: User) -> int:
def jump_joules(user: User) -> Decimal:
return scale_to_joules(user, G, JUMP_FACTOR)

def breath_joules(user: User) -> int:
return int(BREATH_JOULES * (user.scale ** 4))
def breath_joules(user: User) -> Decimal:
return Decimal(BREATH_JOULES * (user.scale ** 4))

def poke_joules(user: User) -> int:
return int(POKE_JOULES * (user.scale ** 4))
def poke_joules(user: User) -> Decimal:
return Decimal(POKE_JOULES * (user.scale ** 4))

0 comments on commit 61ae692

Please sign in to comment.