Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Add more functions for Ratio #99

Open
4 tasks
apopiak opened this issue May 18, 2023 · 0 comments
Open
4 tasks

Add more functions for Ratio #99

apopiak opened this issue May 18, 2023 · 0 comments

Comments

@apopiak
Copy link
Collaborator

apopiak commented May 18, 2023

We will want to use Ratio in calculations.

Missing functions

  • mul_int(Ratio, u128) -> u128 (multiply Ratiowith u128, returning 128) (make generic? probably not)
  • invert(Ratio) -> Ratio (invert numerator and denominator)
  • rounding_mul(Ratio, Ratio. Rounding) -> Ratio (multiply 2 ratios and round them down from (U256, U256) to Ratio
  • full_mul(Ratio, Ratio) -> (U256, U256)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant