Ratio overview
Added in v1.0.0
Table of contents
utils
Ratio
Signature
export declare const Ratio: {
of: <A>(T: Ord<A> & HasToRational<A> & EuclideanRing<A>) => (n: A, d: NonZero<A>) => Ratio<A>
isTypeOf: <A>(innerGuard: (x: unknown) => x is A) => (y: unknown) => y is Ratio<A>
numerator: <A>(r: Ratio<A>) => A
denominator: <A>(r: Ratio<A>) => A
}
Added in v1.0.0
Ratio (interface)
Rational numbers, with numerator and denominator of some Integral type.
Signature
export interface Ratio<A> extends Readonly<{ readonly [RATIO]: { numerator: A; denominator: A } }> {}
Added in v1.0.0