unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
243 lines (242 loc) • 10.5 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a DynamicViscosity */
export interface DynamicViscosityDto {
/** The value of the DynamicViscosity */
value: number;
/** The specific unit that the DynamicViscosity value is representing */
unit: DynamicViscosityUnits;
}
/** DynamicViscosityUnits enumeration */
export declare enum DynamicViscosityUnits {
/** */
NewtonSecondsPerMeterSquared = "NewtonSecondPerMeterSquared",
/** */
PascalSeconds = "PascalSecond",
/** */
Poise = "Poise",
/** */
Reyns = "Reyn",
/** */
PoundsForceSecondPerSquareInch = "PoundForceSecondPerSquareInch",
/** */
PoundsForceSecondPerSquareFoot = "PoundForceSecondPerSquareFoot",
/** */
PoundsPerFootSecond = "PoundPerFootSecond",
/** */
MillipascalSeconds = "MillipascalSecond",
/** */
MicropascalSeconds = "MicropascalSecond",
/** */
Centipoise = "Centipoise"
}
/** The dynamic (shear) viscosity of a fluid expresses its resistance to shearing flows, where adjacent layers move parallel to each other with different speeds */
export declare class DynamicViscosity extends BaseUnit {
protected value: number;
private newtonsecondspermetersquaredLazy;
private pascalsecondsLazy;
private poiseLazy;
private reynsLazy;
private poundsforcesecondpersquareinchLazy;
private poundsforcesecondpersquarefootLazy;
private poundsperfootsecondLazy;
private millipascalsecondsLazy;
private micropascalsecondsLazy;
private centipoiseLazy;
/**
* Create a new DynamicViscosity.
* @param value The value.
* @param fromUnit The ‘DynamicViscosity’ unit to create from.
* The default unit is NewtonSecondsPerMeterSquared
*/
constructor(value: number, fromUnit?: DynamicViscosityUnits);
/**
* The base value of DynamicViscosity is NewtonSecondsPerMeterSquared.
* 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(): DynamicViscosityUnits.NewtonSecondsPerMeterSquared;
/** */
get NewtonSecondsPerMeterSquared(): number;
/** */
get PascalSeconds(): number;
/** */
get Poise(): number;
/** */
get Reyns(): number;
/** */
get PoundsForceSecondPerSquareInch(): number;
/** */
get PoundsForceSecondPerSquareFoot(): number;
/** */
get PoundsPerFootSecond(): number;
/** */
get MillipascalSeconds(): number;
/** */
get MicropascalSeconds(): number;
/** */
get Centipoise(): number;
/**
* Create a new DynamicViscosity instance from a NewtonSecondsPerMeterSquared
*
* @param value The unit as NewtonSecondsPerMeterSquared to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromNewtonSecondsPerMeterSquared(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a PascalSeconds
*
* @param value The unit as PascalSeconds to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromPascalSeconds(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a Poise
*
* @param value The unit as Poise to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromPoise(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a Reyns
*
* @param value The unit as Reyns to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromReyns(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a PoundsForceSecondPerSquareInch
*
* @param value The unit as PoundsForceSecondPerSquareInch to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromPoundsForceSecondPerSquareInch(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a PoundsForceSecondPerSquareFoot
*
* @param value The unit as PoundsForceSecondPerSquareFoot to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromPoundsForceSecondPerSquareFoot(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a PoundsPerFootSecond
*
* @param value The unit as PoundsPerFootSecond to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromPoundsPerFootSecond(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a MillipascalSeconds
*
* @param value The unit as MillipascalSeconds to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromMillipascalSeconds(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a MicropascalSeconds
*
* @param value The unit as MicropascalSeconds to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromMicropascalSeconds(value: number): DynamicViscosity;
/**
* Create a new DynamicViscosity instance from a Centipoise
*
* @param value The unit as Centipoise to create a new DynamicViscosity from.
* @returns The new DynamicViscosity instance.
*/
static FromCentipoise(value: number): DynamicViscosity;
/**
* Gets the base unit enumeration associated with DynamicViscosity
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof DynamicViscosityUnits;
/**
* 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(): DynamicViscosityUnits.NewtonSecondsPerMeterSquared;
/**
* Create API DTO represent a DynamicViscosity unit.
* @param holdInUnit The specific DynamicViscosity unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: DynamicViscosityUnits): DynamicViscosityDto;
/**
* Create a DynamicViscosity unit from an API DTO representation.
* @param dtoDynamicViscosity The DynamicViscosity API DTO representation
*/
static FromDto(dtoDynamicViscosity: DynamicViscosityDto): DynamicViscosity;
/**
* Convert DynamicViscosity to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: DynamicViscosityUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the DynamicViscosity to string.
* Note! the default format for DynamicViscosity is NewtonSecondsPerMeterSquared.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the DynamicViscosity.
* @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 DynamicViscosity.
*/
toString(unit?: DynamicViscosityUnits, options?: number | ToStringOptions): string;
/**
* Get DynamicViscosity unit abbreviation.
* Note! the default abbreviation for DynamicViscosity is NewtonSecondsPerMeterSquared.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the DynamicViscosity.
* @returns The abbreviation string of DynamicViscosity.
*/
getUnitAbbreviation(unitAbbreviation?: DynamicViscosityUnits): string;
/**
* Check if the given DynamicViscosity are equals to the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns True if the given DynamicViscosity are equal to the current DynamicViscosity.
*/
equals(dynamicViscosity: DynamicViscosity): boolean;
/**
* Compare the given DynamicViscosity against the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns 0 if they are equal, -1 if the current DynamicViscosity is less then other, 1 if the current DynamicViscosity is greater then other.
*/
compareTo(dynamicViscosity: DynamicViscosity): number;
/**
* Add the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
add(dynamicViscosity: DynamicViscosity): DynamicViscosity;
/**
* Subtract the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
subtract(dynamicViscosity: DynamicViscosity): DynamicViscosity;
/**
* Multiply the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
multiply(dynamicViscosity: DynamicViscosity): DynamicViscosity;
/**
* Divide the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
divide(dynamicViscosity: DynamicViscosity): DynamicViscosity;
/**
* Modulo the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
modulo(dynamicViscosity: DynamicViscosity): DynamicViscosity;
/**
* Pow the given DynamicViscosity with the current DynamicViscosity.
* @param dynamicViscosity The other DynamicViscosity.
* @returns A new DynamicViscosity instance with the results.
*/
pow(dynamicViscosity: DynamicViscosity): DynamicViscosity;
}