UNPKG

unitsnet-js

Version:

A better way to hold unit variables and easily convert to the destination unit

195 lines (194 loc) 10.2 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a RadiationEquivalentDose */ export interface RadiationEquivalentDoseDto { /** The value of the RadiationEquivalentDose */ value: number; /** The specific unit that the RadiationEquivalentDose value is representing */ unit: RadiationEquivalentDoseUnits; } /** RadiationEquivalentDoseUnits enumeration */ export declare enum RadiationEquivalentDoseUnits { /** The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage. */ Sieverts = "Sievert", /** */ RoentgensEquivalentMan = "RoentgenEquivalentMan", /** */ Nanosieverts = "Nanosievert", /** */ Microsieverts = "Microsievert", /** */ Millisieverts = "Millisievert", /** */ MilliroentgensEquivalentMan = "MilliroentgenEquivalentMan" } /** Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage. */ export declare class RadiationEquivalentDose extends BaseUnit { protected value: number; private sievertsLazy; private roentgensequivalentmanLazy; private nanosievertsLazy; private microsievertsLazy; private millisievertsLazy; private milliroentgensequivalentmanLazy; /** * Create a new RadiationEquivalentDose. * @param value The value. * @param fromUnit The ‘RadiationEquivalentDose’ unit to create from. * The default unit is Sieverts */ constructor(value: number, fromUnit?: RadiationEquivalentDoseUnits); /** * The base value of RadiationEquivalentDose is Sieverts. * This accessor used when needs a value for calculations and it's better to use directly the base value */ get BaseValue(): number; /** Gets the default unit used when creating instances of the unit or its DTO */ protected get baseUnit(): RadiationEquivalentDoseUnits.Sieverts; /** The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage. */ get Sieverts(): number; /** */ get RoentgensEquivalentMan(): number; /** */ get Nanosieverts(): number; /** */ get Microsieverts(): number; /** */ get Millisieverts(): number; /** */ get MilliroentgensEquivalentMan(): number; /** * Create a new RadiationEquivalentDose instance from a Sieverts * The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage. * @param value The unit as Sieverts to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromSieverts(value: number): RadiationEquivalentDose; /** * Create a new RadiationEquivalentDose instance from a RoentgensEquivalentMan * * @param value The unit as RoentgensEquivalentMan to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromRoentgensEquivalentMan(value: number): RadiationEquivalentDose; /** * Create a new RadiationEquivalentDose instance from a Nanosieverts * * @param value The unit as Nanosieverts to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromNanosieverts(value: number): RadiationEquivalentDose; /** * Create a new RadiationEquivalentDose instance from a Microsieverts * * @param value The unit as Microsieverts to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromMicrosieverts(value: number): RadiationEquivalentDose; /** * Create a new RadiationEquivalentDose instance from a Millisieverts * * @param value The unit as Millisieverts to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromMillisieverts(value: number): RadiationEquivalentDose; /** * Create a new RadiationEquivalentDose instance from a MilliroentgensEquivalentMan * * @param value The unit as MilliroentgensEquivalentMan to create a new RadiationEquivalentDose from. * @returns The new RadiationEquivalentDose instance. */ static FromMilliroentgensEquivalentMan(value: number): RadiationEquivalentDose; /** * Gets the base unit enumeration associated with RadiationEquivalentDose * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof RadiationEquivalentDoseUnits; /** * Gets the default unit used when creating instances of the unit or its DTO * @returns The unit enumeration value used as a default parameter in constructor and DTO methods */ protected static getBaseUnit(): RadiationEquivalentDoseUnits.Sieverts; /** * Create API DTO represent a RadiationEquivalentDose unit. * @param holdInUnit The specific RadiationEquivalentDose unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: RadiationEquivalentDoseUnits): RadiationEquivalentDoseDto; /** * Create a RadiationEquivalentDose unit from an API DTO representation. * @param dtoRadiationEquivalentDose The RadiationEquivalentDose API DTO representation */ static FromDto(dtoRadiationEquivalentDose: RadiationEquivalentDoseDto): RadiationEquivalentDose; /** * Convert RadiationEquivalentDose to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: RadiationEquivalentDoseUnits): number; private convertFromBase; private convertToBase; /** * Format the RadiationEquivalentDose to string. * Note! the default format for RadiationEquivalentDose is Sieverts. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the RadiationEquivalentDose. * @param options The ToString options, it also can be the number of fractional digits to keep that deprecated and moved to the options object. support in number will be dropped in the upcoming versions. * @returns The string format of the RadiationEquivalentDose. */ toString(unit?: RadiationEquivalentDoseUnits, options?: number | ToStringOptions): string; /** * Get RadiationEquivalentDose unit abbreviation. * Note! the default abbreviation for RadiationEquivalentDose is Sieverts. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the RadiationEquivalentDose. * @returns The abbreviation string of RadiationEquivalentDose. */ getUnitAbbreviation(unitAbbreviation?: RadiationEquivalentDoseUnits): string; /** * Check if the given RadiationEquivalentDose are equals to the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns True if the given RadiationEquivalentDose are equal to the current RadiationEquivalentDose. */ equals(radiationEquivalentDose: RadiationEquivalentDose): boolean; /** * Compare the given RadiationEquivalentDose against the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns 0 if they are equal, -1 if the current RadiationEquivalentDose is less then other, 1 if the current RadiationEquivalentDose is greater then other. */ compareTo(radiationEquivalentDose: RadiationEquivalentDose): number; /** * Add the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ add(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; /** * Subtract the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ subtract(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; /** * Multiply the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ multiply(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; /** * Divide the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ divide(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; /** * Modulo the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ modulo(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; /** * Pow the given RadiationEquivalentDose with the current RadiationEquivalentDose. * @param radiationEquivalentDose The other RadiationEquivalentDose. * @returns A new RadiationEquivalentDose instance with the results. */ pow(radiationEquivalentDose: RadiationEquivalentDose): RadiationEquivalentDose; }