Skip to content

Commit

Permalink
fix bug in logic
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Oct 17, 2024
1 parent 23252d1 commit cfa0fb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unxt/_src/units/system/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ def unitsystem(
added = (length,)
elif ud.mass in tmp.base_dimensions and ud.speed in tmp.base_dimensions:
length = G * tmp["mass"] / tmp["velocity"] ** 2
time = tmp["length"] / tmp["velocity"]
time = length / tmp["velocity"]
added = (length, time)
elif ud.time in tmp.base_dimensions and ud.speed in tmp.base_dimensions:
mass = 1 / G * tmp["velocity"] ** 3 * tmp["time"]
length = G * tmp["mass"] / tmp["velocity"] ** 2
length = G * mass / tmp["velocity"] ** 2
added = (mass, length)

return unitsystem(*tmp, *added)
Expand Down

0 comments on commit cfa0fb0

Please sign in to comment.