image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
51 lines (50 loc) • 1.3 kB
TypeScript
/** @format */
/**
* Represents a rational number.
*/
export declare class Rational {
/**
* The numerator of the rational number.
*/
private _numerator;
/**
* Gets the numerator of the rational number.
*/
get numerator(): number;
/**
* The denominator of the rational number.
*/
private _denominator;
/**
* Gets the denominator of the rational number.
*/
get denominator(): number;
/**
* Converts the rational number to an integer.
*/
get toInt(): number;
/**
* Converts the rational number to a double.
*/
get toDouble(): number;
/**
* Constructs a new Rational instance.
* @param {number} numerator - The numerator of the rational number.
* @param {number} denominator - The denominator of the rational number.
*/
constructor(numerator: number, denominator: number);
/**
* Simplifies the rational number.
*/
simplify(): void;
/**
* Checks if this rational number is equal to another.
* @param {Rational} other - The other rational number to compare with.
* @returns {boolean}
*/
equals(other: Rational): boolean;
/**
* Converts the rational number to a string representation.
*/
toString(): string;
}