Liking cljdoc? Tell your friends :D

emmy.ratio

This namespace provides a number of functions and constructors for working with ratios in Clojure and ClojureScript.

[[clojure.lang.Ratio]] is native in Clojure. The ClojureScript implementation uses Fraction.js.

For other numeric extensions, see [[emmy.numbers]] and emmy.complex.

This namespace provides a number of functions and constructors for working
with ratios in Clojure and ClojureScript.

[[clojure.lang.Ratio]] is native in Clojure. The ClojureScript implementation
uses [Fraction.js](https://github.com/infusion/Fraction.js/).

For other numeric extensions, see [[emmy.numbers]]
and [[emmy.complex]].
raw docstring

IRationalclj/sprotocol

denominatorclj/s

(denominator _)

numeratorclj/s

(numerator _)
source

matches?clj/s

(matches? pattern s)
source

parse-ratioclj/s

(parse-ratio x)

Parser for the #emmy/ratio literal.

Parser for the `#emmy/ratio` literal.
sourceraw docstring

ratio?clj/s

source

rationalizeclj/s

(rationalize x)
(rationalize n d)

Construct a ratio.

Construct a ratio.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close