Skip to content

not-very-good collection of functions for rational numbers in Lua

License

Notifications You must be signed in to change notification settings

PraseodymiumSpike/Rationals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Rationals

not-very-good collection of functions for rational numbers in Lua

a few notes:

  1. Arithmetic and relational operations may only be used with 2 rationals, not with a rational and a number!
  2. It is generally not a good idea to try to exponentiate rationals. However, it can technically be done if the answer is real and rational. It will raise an error if the answer is not real or not rational!
  3. This was purely a project for practicing using metatables. There are probably better alternatives out there.
  4. If you do want to use it, just copy-paste the code from Rationals.lua into your own source code. I think you can also use the require function, but I don't know how.

About

not-very-good collection of functions for rational numbers in Lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages