unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
255 lines (254 loc) • 9.74 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a Jerk */
export interface JerkDto {
/** The value of the Jerk */
value: number;
/** The specific unit that the Jerk value is representing */
unit: JerkUnits;
}
/** JerkUnits enumeration */
export declare enum JerkUnits {
/** */
MetersPerSecondCubed = "MeterPerSecondCubed",
/** */
InchesPerSecondCubed = "InchPerSecondCubed",
/** */
FeetPerSecondCubed = "FootPerSecondCubed",
/** */
StandardGravitiesPerSecond = "StandardGravitiesPerSecond",
/** */
NanometersPerSecondCubed = "NanometerPerSecondCubed",
/** */
MicrometersPerSecondCubed = "MicrometerPerSecondCubed",
/** */
MillimetersPerSecondCubed = "MillimeterPerSecondCubed",
/** */
CentimetersPerSecondCubed = "CentimeterPerSecondCubed",
/** */
DecimetersPerSecondCubed = "DecimeterPerSecondCubed",
/** */
KilometersPerSecondCubed = "KilometerPerSecondCubed",
/** */
MillistandardGravitiesPerSecond = "MillistandardGravitiesPerSecond"
}
/** Jerk or Jolt, in physics, is the rate at which the acceleration of an object changes over time. The SI unit for jerk is the Meter per second cubed (m/s³). Jerks are vector quantities (they have magnitude and direction) and add according to the parallelogram law. */
export declare class Jerk extends BaseUnit {
protected value: number;
private meterspersecondcubedLazy;
private inchespersecondcubedLazy;
private feetpersecondcubedLazy;
private standardgravitiespersecondLazy;
private nanometerspersecondcubedLazy;
private micrometerspersecondcubedLazy;
private millimeterspersecondcubedLazy;
private centimeterspersecondcubedLazy;
private decimeterspersecondcubedLazy;
private kilometerspersecondcubedLazy;
private millistandardgravitiespersecondLazy;
/**
* Create a new Jerk.
* @param value The value.
* @param fromUnit The ‘Jerk’ unit to create from.
* The default unit is MetersPerSecondCubed
*/
constructor(value: number, fromUnit?: JerkUnits);
/**
* The base value of Jerk is MetersPerSecondCubed.
* 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(): JerkUnits.MetersPerSecondCubed;
/** */
get MetersPerSecondCubed(): number;
/** */
get InchesPerSecondCubed(): number;
/** */
get FeetPerSecondCubed(): number;
/** */
get StandardGravitiesPerSecond(): number;
/** */
get NanometersPerSecondCubed(): number;
/** */
get MicrometersPerSecondCubed(): number;
/** */
get MillimetersPerSecondCubed(): number;
/** */
get CentimetersPerSecondCubed(): number;
/** */
get DecimetersPerSecondCubed(): number;
/** */
get KilometersPerSecondCubed(): number;
/** */
get MillistandardGravitiesPerSecond(): number;
/**
* Create a new Jerk instance from a MetersPerSecondCubed
*
* @param value The unit as MetersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromMetersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a InchesPerSecondCubed
*
* @param value The unit as InchesPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromInchesPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a FeetPerSecondCubed
*
* @param value The unit as FeetPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromFeetPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a StandardGravitiesPerSecond
*
* @param value The unit as StandardGravitiesPerSecond to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromStandardGravitiesPerSecond(value: number): Jerk;
/**
* Create a new Jerk instance from a NanometersPerSecondCubed
*
* @param value The unit as NanometersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromNanometersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a MicrometersPerSecondCubed
*
* @param value The unit as MicrometersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromMicrometersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a MillimetersPerSecondCubed
*
* @param value The unit as MillimetersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromMillimetersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a CentimetersPerSecondCubed
*
* @param value The unit as CentimetersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromCentimetersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a DecimetersPerSecondCubed
*
* @param value The unit as DecimetersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromDecimetersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a KilometersPerSecondCubed
*
* @param value The unit as KilometersPerSecondCubed to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromKilometersPerSecondCubed(value: number): Jerk;
/**
* Create a new Jerk instance from a MillistandardGravitiesPerSecond
*
* @param value The unit as MillistandardGravitiesPerSecond to create a new Jerk from.
* @returns The new Jerk instance.
*/
static FromMillistandardGravitiesPerSecond(value: number): Jerk;
/**
* Gets the base unit enumeration associated with Jerk
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof JerkUnits;
/**
* 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(): JerkUnits.MetersPerSecondCubed;
/**
* Create API DTO represent a Jerk unit.
* @param holdInUnit The specific Jerk unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: JerkUnits): JerkDto;
/**
* Create a Jerk unit from an API DTO representation.
* @param dtoJerk The Jerk API DTO representation
*/
static FromDto(dtoJerk: JerkDto): Jerk;
/**
* Convert Jerk to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: JerkUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the Jerk to string.
* Note! the default format for Jerk is MetersPerSecondCubed.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the Jerk.
* @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 Jerk.
*/
toString(unit?: JerkUnits, options?: number | ToStringOptions): string;
/**
* Get Jerk unit abbreviation.
* Note! the default abbreviation for Jerk is MetersPerSecondCubed.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the Jerk.
* @returns The abbreviation string of Jerk.
*/
getUnitAbbreviation(unitAbbreviation?: JerkUnits): string;
/**
* Check if the given Jerk are equals to the current Jerk.
* @param jerk The other Jerk.
* @returns True if the given Jerk are equal to the current Jerk.
*/
equals(jerk: Jerk): boolean;
/**
* Compare the given Jerk against the current Jerk.
* @param jerk The other Jerk.
* @returns 0 if they are equal, -1 if the current Jerk is less then other, 1 if the current Jerk is greater then other.
*/
compareTo(jerk: Jerk): number;
/**
* Add the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
add(jerk: Jerk): Jerk;
/**
* Subtract the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
subtract(jerk: Jerk): Jerk;
/**
* Multiply the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
multiply(jerk: Jerk): Jerk;
/**
* Divide the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
divide(jerk: Jerk): Jerk;
/**
* Modulo the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
modulo(jerk: Jerk): Jerk;
/**
* Pow the given Jerk with the current Jerk.
* @param jerk The other Jerk.
* @returns A new Jerk instance with the results.
*/
pow(jerk: Jerk): Jerk;
}