unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
303 lines (302 loc) • 12.7 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a ForceChangeRate */
export interface ForceChangeRateDto {
/** The value of the ForceChangeRate */
value: number;
/** The specific unit that the ForceChangeRate value is representing */
unit: ForceChangeRateUnits;
}
/** ForceChangeRateUnits enumeration */
export declare enum ForceChangeRateUnits {
/** */
NewtonsPerMinute = "NewtonPerMinute",
/** */
NewtonsPerSecond = "NewtonPerSecond",
/** */
PoundsForcePerMinute = "PoundForcePerMinute",
/** */
PoundsForcePerSecond = "PoundForcePerSecond",
/** */
DecanewtonsPerMinute = "DecanewtonPerMinute",
/** */
KilonewtonsPerMinute = "KilonewtonPerMinute",
/** */
NanonewtonsPerSecond = "NanonewtonPerSecond",
/** */
MicronewtonsPerSecond = "MicronewtonPerSecond",
/** */
MillinewtonsPerSecond = "MillinewtonPerSecond",
/** */
CentinewtonsPerSecond = "CentinewtonPerSecond",
/** */
DecinewtonsPerSecond = "DecinewtonPerSecond",
/** */
DecanewtonsPerSecond = "DecanewtonPerSecond",
/** */
KilonewtonsPerSecond = "KilonewtonPerSecond",
/** */
KilopoundsForcePerMinute = "KilopoundForcePerMinute",
/** */
KilopoundsForcePerSecond = "KilopoundForcePerSecond"
}
/** Force change rate is the ratio of the force change to the time during which the change occurred (value of force changes per unit time). */
export declare class ForceChangeRate extends BaseUnit {
protected value: number;
private newtonsperminuteLazy;
private newtonspersecondLazy;
private poundsforceperminuteLazy;
private poundsforcepersecondLazy;
private decanewtonsperminuteLazy;
private kilonewtonsperminuteLazy;
private nanonewtonspersecondLazy;
private micronewtonspersecondLazy;
private millinewtonspersecondLazy;
private centinewtonspersecondLazy;
private decinewtonspersecondLazy;
private decanewtonspersecondLazy;
private kilonewtonspersecondLazy;
private kilopoundsforceperminuteLazy;
private kilopoundsforcepersecondLazy;
/**
* Create a new ForceChangeRate.
* @param value The value.
* @param fromUnit The ‘ForceChangeRate’ unit to create from.
* The default unit is NewtonsPerSecond
*/
constructor(value: number, fromUnit?: ForceChangeRateUnits);
/**
* The base value of ForceChangeRate is NewtonsPerSecond.
* 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(): ForceChangeRateUnits.NewtonsPerSecond;
/** */
get NewtonsPerMinute(): number;
/** */
get NewtonsPerSecond(): number;
/** */
get PoundsForcePerMinute(): number;
/** */
get PoundsForcePerSecond(): number;
/** */
get DecanewtonsPerMinute(): number;
/** */
get KilonewtonsPerMinute(): number;
/** */
get NanonewtonsPerSecond(): number;
/** */
get MicronewtonsPerSecond(): number;
/** */
get MillinewtonsPerSecond(): number;
/** */
get CentinewtonsPerSecond(): number;
/** */
get DecinewtonsPerSecond(): number;
/** */
get DecanewtonsPerSecond(): number;
/** */
get KilonewtonsPerSecond(): number;
/** */
get KilopoundsForcePerMinute(): number;
/** */
get KilopoundsForcePerSecond(): number;
/**
* Create a new ForceChangeRate instance from a NewtonsPerMinute
*
* @param value The unit as NewtonsPerMinute to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromNewtonsPerMinute(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a NewtonsPerSecond
*
* @param value The unit as NewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromNewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a PoundsForcePerMinute
*
* @param value The unit as PoundsForcePerMinute to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromPoundsForcePerMinute(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a PoundsForcePerSecond
*
* @param value The unit as PoundsForcePerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromPoundsForcePerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a DecanewtonsPerMinute
*
* @param value The unit as DecanewtonsPerMinute to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromDecanewtonsPerMinute(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a KilonewtonsPerMinute
*
* @param value The unit as KilonewtonsPerMinute to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromKilonewtonsPerMinute(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a NanonewtonsPerSecond
*
* @param value The unit as NanonewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromNanonewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a MicronewtonsPerSecond
*
* @param value The unit as MicronewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromMicronewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a MillinewtonsPerSecond
*
* @param value The unit as MillinewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromMillinewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a CentinewtonsPerSecond
*
* @param value The unit as CentinewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromCentinewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a DecinewtonsPerSecond
*
* @param value The unit as DecinewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromDecinewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a DecanewtonsPerSecond
*
* @param value The unit as DecanewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromDecanewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a KilonewtonsPerSecond
*
* @param value The unit as KilonewtonsPerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromKilonewtonsPerSecond(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a KilopoundsForcePerMinute
*
* @param value The unit as KilopoundsForcePerMinute to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromKilopoundsForcePerMinute(value: number): ForceChangeRate;
/**
* Create a new ForceChangeRate instance from a KilopoundsForcePerSecond
*
* @param value The unit as KilopoundsForcePerSecond to create a new ForceChangeRate from.
* @returns The new ForceChangeRate instance.
*/
static FromKilopoundsForcePerSecond(value: number): ForceChangeRate;
/**
* Gets the base unit enumeration associated with ForceChangeRate
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof ForceChangeRateUnits;
/**
* 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(): ForceChangeRateUnits.NewtonsPerSecond;
/**
* Create API DTO represent a ForceChangeRate unit.
* @param holdInUnit The specific ForceChangeRate unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: ForceChangeRateUnits): ForceChangeRateDto;
/**
* Create a ForceChangeRate unit from an API DTO representation.
* @param dtoForceChangeRate The ForceChangeRate API DTO representation
*/
static FromDto(dtoForceChangeRate: ForceChangeRateDto): ForceChangeRate;
/**
* Convert ForceChangeRate to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: ForceChangeRateUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the ForceChangeRate to string.
* Note! the default format for ForceChangeRate is NewtonsPerSecond.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the ForceChangeRate.
* @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 ForceChangeRate.
*/
toString(unit?: ForceChangeRateUnits, options?: number | ToStringOptions): string;
/**
* Get ForceChangeRate unit abbreviation.
* Note! the default abbreviation for ForceChangeRate is NewtonsPerSecond.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the ForceChangeRate.
* @returns The abbreviation string of ForceChangeRate.
*/
getUnitAbbreviation(unitAbbreviation?: ForceChangeRateUnits): string;
/**
* Check if the given ForceChangeRate are equals to the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns True if the given ForceChangeRate are equal to the current ForceChangeRate.
*/
equals(forceChangeRate: ForceChangeRate): boolean;
/**
* Compare the given ForceChangeRate against the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns 0 if they are equal, -1 if the current ForceChangeRate is less then other, 1 if the current ForceChangeRate is greater then other.
*/
compareTo(forceChangeRate: ForceChangeRate): number;
/**
* Add the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
add(forceChangeRate: ForceChangeRate): ForceChangeRate;
/**
* Subtract the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
subtract(forceChangeRate: ForceChangeRate): ForceChangeRate;
/**
* Multiply the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
multiply(forceChangeRate: ForceChangeRate): ForceChangeRate;
/**
* Divide the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
divide(forceChangeRate: ForceChangeRate): ForceChangeRate;
/**
* Modulo the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
modulo(forceChangeRate: ForceChangeRate): ForceChangeRate;
/**
* Pow the given ForceChangeRate with the current ForceChangeRate.
* @param forceChangeRate The other ForceChangeRate.
* @returns A new ForceChangeRate instance with the results.
*/
pow(forceChangeRate: ForceChangeRate): ForceChangeRate;
}