Debian Codegraph @

intl/icu_capi/bindings/js/ICU4XUnitsConverter.d.ts

raw
1 import { f64 } from "./diplomat-runtime"
2
3 /**
4
5 * An ICU4X Units Converter object, capable of converting between two {@link ICU4XMeasureUnit `ICU4XMeasureUnit`}s.
6
7 * You can create an instance of this object using {@link ICU4XUnitsConverterFactory `ICU4XUnitsConverterFactory`} by calling the `converter` method.
8
9 * See the {@link https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html Rust documentation for `UnitsConverter`} for more information.
10 */
11 export class ICU4XUnitsConverter {
12
13 /**
14
15 * Converts the input value in float from the input unit to the output unit (that have been used to create this converter). NOTE: The conversion using floating-point operations is not as accurate as the conversion using ratios.
16
17 * See the {@link https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html#method.convert Rust documentation for `convert`} for more information.
18 */
19 convert_f64(value: f64): f64;
20
21 /**
22
23 * Clones the current {@link ICU4XUnitsConverter `ICU4XUnitsConverter`} object.
24
25 * See the {@link https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html#method.clone Rust documentation for `clone`} for more information.
26 */
27 clone(): ICU4XUnitsConverter;
28 }