Skip to main content
Go to Latest
class FractionJs
import { FractionJs } from "https://deno.land/x/postcss_autoprefixer@0.2.4/lib/deps.js";

Constructors

new
FractionJs(fraction: Fraction)
new
FractionJs(num: number | string)
new
FractionJs(numerator: number, denominator: number)
new
FractionJs(numbers: [number | string, number | string])
new
FractionJs(fraction: NumeratorDenominator)
new
FractionJs(firstValue:
| Fraction
| number
| string
| [number | string, number | string]
| NumeratorDenominator
, secondValue?: number
)

Properties

add: FractionConstructor
d: number
div: FractionConstructor
gcd: FractionConstructor
lcm: FractionConstructor
mul: FractionConstructor
n: number
pow: FractionConstructor
s: number
sub: FractionConstructor

Methods

abs(): Fraction
ceil(places?: number): Fraction
clone(): Fraction
compare(n: number | string | Fraction): number
divisible(n: number | string | Fraction): boolean
equals(n: number | string | Fraction): boolean
floor(places?: number): Fraction
inverse(): Fraction
mod(n?: number | string | Fraction): Fraction
neg(): Fraction
round(places?: number): Fraction
simplify(eps?: number): Fraction
toContinued(): number[]
toFraction(excludeWhole?: boolean): string
toLatex(excludeWhole?: boolean): string
toString(decimalPlaces?: number): string
valueOf(): number