Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stdlib): Add toIntegerRatio and fromIntegerRatio to Rational Library #1746

Merged
merged 7 commits into from
Apr 17, 2023

Conversation

spotandjake
Copy link
Member

This adds toIntegerRation and fromIntegerRation, to the rational library.

This doesnt close #1672, but it adds a few of the functions for it.

@spotandjake spotandjake self-assigned this Mar 12, 2023
@spotandjake spotandjake changed the title feat: Add toIntegerRatio and fromIntegerRatio to Rational Library feat(stdlib): Add toIntegerRatio and fromIntegerRatio to Rational Library Mar 18, 2023
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a few more changes.

stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
stdlib/rational.gr Outdated Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@phated phated added this pull request to the merge queue Apr 16, 2023
Merged via the queue into grain-lang:main with commit 008a735 Apr 17, 2023
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 18, 2023
… Library (grain-lang#1746)

* feat: Add `toIntegerRatio` and `fromIntegerRatio`  to Rational Library

* chore: Throw an exeception on `fromIntegerRation`

* chore: run formatter

* chore: Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Oscar Spencer <oscar.spen@gmail.com>

* chore: Regen docs

* chore: Apply suggestions from code review

---------

Co-authored-by: Oscar Spencer <oscar.spen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add new Rational functions
4 participants