/** * Structural interface satisfied by any object that carries a numerator/denominator * factor and an optional offset — for example, the EC `Unit` and `Constant` classes in * `@itwin/ecschema-metadata`. * @internal */ export interface UnitConversionSource { readonly numerator: number; readonly denominator: number; readonly offset?: number; } /** * Class used for storing calculated conversion between two Units and converting values from one Unit to another. * @internal */ export declare class UnitConversion { readonly factor: number; readonly offset: number; constructor(factor?: number, offset?: number); /** * Converts x using UnitConversion * @param x Input magnitude to be converted * @returns Output magnitude after conversion */ evaluate(x: number): number; /** * Used to invert source's UnitConversion so that it can be composed with target's UnitConversion cleanly * @internal */ inverse(): UnitConversion; /** * Combines two UnitConversions * Used to combine source's UnitConversion and target's UnitConversion for a final UnitConversion that can be evaluated * @internal */ compose(conversion: UnitConversion): UnitConversion; /** * Multiples two UnitConversions together to calculate factor during reducing * @internal */ multiply(conversion: UnitConversion): UnitConversion; /** * Raise UnitConversion's factor with power exponent to calculate factor during reducing * @internal */ raise(power: number): UnitConversion; /** @internal */ static identity: UnitConversion; /** * Returns UnitConversion with source's numerator and denominator in factor and source's offset in offset for reducing. * Accepts any object that structurally satisfies `UnitConversionSource` (e.g. EC `Unit` or `Constant`). * @internal */ static from(source: UnitConversionSource): UnitConversion; } //# sourceMappingURL=UnitConversion.d.ts.map