// generated by diplomat-tool import type { DecimalLimitError } from "./DecimalLimitError" import type { DecimalParseError } from "./DecimalParseError" import type { DecimalRoundingIncrement } from "./DecimalRoundingIncrement" import type { DecimalSign } from "./DecimalSign" import type { DecimalSignDisplay } from "./DecimalSignDisplay" import type { DecimalSignedRoundingMode } from "./DecimalSignedRoundingMode" import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
/** *Seethe[Rustdocumentationfor`Decimal`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html) for more information.
*/
export class Decimal { /** @internal */
get ffiValue(): pointer; /** @internal */
constructor();
/** *Constructan{@linkDecimal}fromaninteger. * *Seethe[Rustdocumentationfor`Decimal`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html) for more information.
*/ static fromNumber(v: number): Decimal;
/** *Constructan{@linkDecimal}fromaninteger. * *Seethe[Rustdocumentationfor`Decimal`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html) for more information.
*/ static fromBigInt(v: bigint): Decimal;
/** *Constructan{@linkDecimal}fromanfloat,withagivenpowerof10forthelowermagnitude * *Seethe[Rustdocumentationfor`try_from_f64`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.try_from_f64) for more information. * *Seethe[Rustdocumentationfor`FloatPrecision`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/enum.FloatPrecision.html) for more information.
*/ static fromNumberWithLowerMagnitude(f: number, magnitude: number): Decimal;
/** *Constructan{@linkDecimal}fromanfloat,foragivennumberofsignificantdigits * *Seethe[Rustdocumentationfor`try_from_f64`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.try_from_f64) for more information. * *Seethe[Rustdocumentationfor`FloatPrecision`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/enum.FloatPrecision.html) for more information.
*/ static fromNumberWithSignificantDigits(f: number, digits: number): Decimal;
/** *Constructan{@linkDecimal}fromanfloat,withenoughdigitstorecover *theoriginalfloatingpointinIEEE754withoutneedingtrailingzeros * *Seethe[Rustdocumentationfor`try_from_f64`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.try_from_f64) for more information. * *Seethe[Rustdocumentationfor`FloatPrecision`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/enum.FloatPrecision.html) for more information.
*/ static fromNumberWithRoundTripPrecision(f: number): Decimal;
/** *Constructan{@linkDecimal}fromastring. * *Seethe[Rustdocumentationfor`try_from_str`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.try_from_str) for more information.
*/ static fromString(v: string): Decimal;
/** *Seethe[Rustdocumentationfor`digit_at`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.digit_at) for more information.
*/
digitAt(magnitude: number): number;
/** *Seethe[Rustdocumentationfor`magnitude_range`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.magnitude_range) for more information.
*/
get magnitudeStart(): number;
/** *Seethe[Rustdocumentationfor`magnitude_range`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.magnitude_range) for more information.
*/
get magnitudeEnd(): number;
/** *Seethe[Rustdocumentationfor`nonzero_magnitude_start`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.nonzero_magnitude_start) for more information.
*/
get nonzeroMagnitudeStart(): number;
/** *Seethe[Rustdocumentationfor`nonzero_magnitude_end`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.nonzero_magnitude_end) for more information.
*/
get nonzeroMagnitudeEnd(): number;
/** *Seethe[Rustdocumentationfor`is_zero`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.is_zero) for more information.
*/
get isZero(): boolean;
/** *Multiplythe{@linkDecimal}byagivenpoweroften. * *Seethe[Rustdocumentationfor`multiply_pow10`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.multiply_pow10) for more information.
*/
multiplyPow10(power: number): void;
/** *Seethe[Rustdocumentationfor`sign`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.sign) for more information.
*/
get sign(): DecimalSign;
/** *Setthesignofthe{@linkDecimal}. * *Seethe[Rustdocumentationfor`set_sign`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.set_sign) for more information.
*/
set sign(sign: DecimalSign);
/** *Seethe[Rustdocumentationfor`apply_sign_display`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.apply_sign_display) for more information.
*/
applySignDisplay(signDisplay: DecimalSignDisplay): void;
/** *Seethe[Rustdocumentationfor`trim_start`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.trim_start) for more information.
*/
trimStart(): void;
/** *Seethe[Rustdocumentationfor`trim_end`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.trim_end) for more information.
*/
trimEnd(): void;
/** *Seethe[Rustdocumentationfor`trim_end_if_integer`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.trim_end_if_integer) for more information.
*/
trimEndIfInteger(): void;
/** *Zero-padthe{@linkDecimal}onthelefttoaparticularposition * *Seethe[Rustdocumentationfor`pad_start`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.pad_start) for more information.
*/
padStart(position: number): void;
/** *Zero-padthe{@linkDecimal}ontherighttoaparticularposition * *Seethe[Rustdocumentationfor`pad_end`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.pad_end) for more information.
*/
padEnd(position: number): void;
/** *Truncatethe{@linkDecimal}onthelefttoaparticularposition,deletingdigitsifnecessary.Thisisusefulfor,e.g.abbreviatingyears *("2022"->"22") * *Seethe[Rustdocumentationfor`set_max_position`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.set_max_position) for more information.
*/
setMaxPosition(position: number): void;
/** *Roundthenumberataparticulardigitposition. * *Thisuseshalftoevenrounding,whichresolvestiesbyselectingthenearest *evenintegertotheoriginalvalue. * *Seethe[Rustdocumentationfor`round`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.round) for more information.
*/
round(position: number): void;
/** *Seethe[Rustdocumentationfor`ceil`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.ceil) for more information.
*/
ceil(position: number): void;
/** *Seethe[Rustdocumentationfor`expand`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.expand) for more information.
*/
expand(position: number): void;
/** *Seethe[Rustdocumentationfor`floor`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.floor) for more information.
*/
floor(position: number): void;
/** *Seethe[Rustdocumentationfor`trunc`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.trunc) for more information.
*/
trunc(position: number): void;
/** *Seethe[Rustdocumentationfor`round_with_mode`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.round_with_mode) for more information.
*/
roundWithMode(position: number, mode: DecimalSignedRoundingMode): void;
/** *Seethe[Rustdocumentationfor`round_with_mode_and_increment`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.round_with_mode_and_increment) for more information.
*/
roundWithModeAndIncrement(position: number, mode: DecimalSignedRoundingMode, increment: DecimalRoundingIncrement): void;
/** *Concatenates`other`totheendof`self`. * *Ifsuccessful,`other`willbesetto0andasuccessfulstatusisreturned. * *Ifnotsuccessful,`other`willbeunchangedandanerrorisreturned. * *Seethe[Rustdocumentationfor`concatenate_end`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.concatenate_end) for more information.
*/
concatenateEnd(other: Decimal): boolean;
/** *Formatthe{@linkDecimal}asastring. * *Seethe[Rustdocumentationfor`write_to`](https://docs.rs/fixed_decimal/0.7.0/fixed_decimal/type.Decimal.html#method.write_to) for more information.
*/
toString(): string;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.