UNPKG

unitsnet-js

Version:

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

579 lines (578 loc) 23.4 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a ForcePerLength */ export interface ForcePerLengthDto { /** The value of the ForcePerLength */ value: number; /** The specific unit that the ForcePerLength value is representing */ unit: ForcePerLengthUnits; } /** ForcePerLengthUnits enumeration */ export declare enum ForcePerLengthUnits { /** */ NewtonsPerMeter = "NewtonPerMeter", /** */ NewtonsPerCentimeter = "NewtonPerCentimeter", /** */ NewtonsPerMillimeter = "NewtonPerMillimeter", /** */ KilogramsForcePerMeter = "KilogramForcePerMeter", /** */ KilogramsForcePerCentimeter = "KilogramForcePerCentimeter", /** */ KilogramsForcePerMillimeter = "KilogramForcePerMillimeter", /** */ TonnesForcePerMeter = "TonneForcePerMeter", /** */ TonnesForcePerCentimeter = "TonneForcePerCentimeter", /** */ TonnesForcePerMillimeter = "TonneForcePerMillimeter", /** */ PoundsForcePerFoot = "PoundForcePerFoot", /** */ PoundsForcePerInch = "PoundForcePerInch", /** */ PoundsForcePerYard = "PoundForcePerYard", /** */ KilopoundsForcePerFoot = "KilopoundForcePerFoot", /** */ KilopoundsForcePerInch = "KilopoundForcePerInch", /** */ NanonewtonsPerMeter = "NanonewtonPerMeter", /** */ MicronewtonsPerMeter = "MicronewtonPerMeter", /** */ MillinewtonsPerMeter = "MillinewtonPerMeter", /** */ CentinewtonsPerMeter = "CentinewtonPerMeter", /** */ DecinewtonsPerMeter = "DecinewtonPerMeter", /** */ DecanewtonsPerMeter = "DecanewtonPerMeter", /** */ KilonewtonsPerMeter = "KilonewtonPerMeter", /** */ MeganewtonsPerMeter = "MeganewtonPerMeter", /** */ NanonewtonsPerCentimeter = "NanonewtonPerCentimeter", /** */ MicronewtonsPerCentimeter = "MicronewtonPerCentimeter", /** */ MillinewtonsPerCentimeter = "MillinewtonPerCentimeter", /** */ CentinewtonsPerCentimeter = "CentinewtonPerCentimeter", /** */ DecinewtonsPerCentimeter = "DecinewtonPerCentimeter", /** */ DecanewtonsPerCentimeter = "DecanewtonPerCentimeter", /** */ KilonewtonsPerCentimeter = "KilonewtonPerCentimeter", /** */ MeganewtonsPerCentimeter = "MeganewtonPerCentimeter", /** */ NanonewtonsPerMillimeter = "NanonewtonPerMillimeter", /** */ MicronewtonsPerMillimeter = "MicronewtonPerMillimeter", /** */ MillinewtonsPerMillimeter = "MillinewtonPerMillimeter", /** */ CentinewtonsPerMillimeter = "CentinewtonPerMillimeter", /** */ DecinewtonsPerMillimeter = "DecinewtonPerMillimeter", /** */ DecanewtonsPerMillimeter = "DecanewtonPerMillimeter", /** */ KilonewtonsPerMillimeter = "KilonewtonPerMillimeter", /** */ MeganewtonsPerMillimeter = "MeganewtonPerMillimeter" } /** The magnitude of force per unit length. */ export declare class ForcePerLength extends BaseUnit { protected value: number; private newtonspermeterLazy; private newtonspercentimeterLazy; private newtonspermillimeterLazy; private kilogramsforcepermeterLazy; private kilogramsforcepercentimeterLazy; private kilogramsforcepermillimeterLazy; private tonnesforcepermeterLazy; private tonnesforcepercentimeterLazy; private tonnesforcepermillimeterLazy; private poundsforceperfootLazy; private poundsforceperinchLazy; private poundsforceperyardLazy; private kilopoundsforceperfootLazy; private kilopoundsforceperinchLazy; private nanonewtonspermeterLazy; private micronewtonspermeterLazy; private millinewtonspermeterLazy; private centinewtonspermeterLazy; private decinewtonspermeterLazy; private decanewtonspermeterLazy; private kilonewtonspermeterLazy; private meganewtonspermeterLazy; private nanonewtonspercentimeterLazy; private micronewtonspercentimeterLazy; private millinewtonspercentimeterLazy; private centinewtonspercentimeterLazy; private decinewtonspercentimeterLazy; private decanewtonspercentimeterLazy; private kilonewtonspercentimeterLazy; private meganewtonspercentimeterLazy; private nanonewtonspermillimeterLazy; private micronewtonspermillimeterLazy; private millinewtonspermillimeterLazy; private centinewtonspermillimeterLazy; private decinewtonspermillimeterLazy; private decanewtonspermillimeterLazy; private kilonewtonspermillimeterLazy; private meganewtonspermillimeterLazy; /** * Create a new ForcePerLength. * @param value The value. * @param fromUnit The ‘ForcePerLength’ unit to create from. * The default unit is NewtonsPerMeter */ constructor(value: number, fromUnit?: ForcePerLengthUnits); /** * The base value of ForcePerLength is NewtonsPerMeter. * 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(): ForcePerLengthUnits.NewtonsPerMeter; /** */ get NewtonsPerMeter(): number; /** */ get NewtonsPerCentimeter(): number; /** */ get NewtonsPerMillimeter(): number; /** */ get KilogramsForcePerMeter(): number; /** */ get KilogramsForcePerCentimeter(): number; /** */ get KilogramsForcePerMillimeter(): number; /** */ get TonnesForcePerMeter(): number; /** */ get TonnesForcePerCentimeter(): number; /** */ get TonnesForcePerMillimeter(): number; /** */ get PoundsForcePerFoot(): number; /** */ get PoundsForcePerInch(): number; /** */ get PoundsForcePerYard(): number; /** */ get KilopoundsForcePerFoot(): number; /** */ get KilopoundsForcePerInch(): number; /** */ get NanonewtonsPerMeter(): number; /** */ get MicronewtonsPerMeter(): number; /** */ get MillinewtonsPerMeter(): number; /** */ get CentinewtonsPerMeter(): number; /** */ get DecinewtonsPerMeter(): number; /** */ get DecanewtonsPerMeter(): number; /** */ get KilonewtonsPerMeter(): number; /** */ get MeganewtonsPerMeter(): number; /** */ get NanonewtonsPerCentimeter(): number; /** */ get MicronewtonsPerCentimeter(): number; /** */ get MillinewtonsPerCentimeter(): number; /** */ get CentinewtonsPerCentimeter(): number; /** */ get DecinewtonsPerCentimeter(): number; /** */ get DecanewtonsPerCentimeter(): number; /** */ get KilonewtonsPerCentimeter(): number; /** */ get MeganewtonsPerCentimeter(): number; /** */ get NanonewtonsPerMillimeter(): number; /** */ get MicronewtonsPerMillimeter(): number; /** */ get MillinewtonsPerMillimeter(): number; /** */ get CentinewtonsPerMillimeter(): number; /** */ get DecinewtonsPerMillimeter(): number; /** */ get DecanewtonsPerMillimeter(): number; /** */ get KilonewtonsPerMillimeter(): number; /** */ get MeganewtonsPerMillimeter(): number; /** * Create a new ForcePerLength instance from a NewtonsPerMeter * * @param value The unit as NewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a NewtonsPerCentimeter * * @param value The unit as NewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a NewtonsPerMillimeter * * @param value The unit as NewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilogramsForcePerMeter * * @param value The unit as KilogramsForcePerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilogramsForcePerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilogramsForcePerCentimeter * * @param value The unit as KilogramsForcePerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilogramsForcePerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilogramsForcePerMillimeter * * @param value The unit as KilogramsForcePerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilogramsForcePerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a TonnesForcePerMeter * * @param value The unit as TonnesForcePerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromTonnesForcePerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a TonnesForcePerCentimeter * * @param value The unit as TonnesForcePerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromTonnesForcePerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a TonnesForcePerMillimeter * * @param value The unit as TonnesForcePerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromTonnesForcePerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a PoundsForcePerFoot * * @param value The unit as PoundsForcePerFoot to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromPoundsForcePerFoot(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a PoundsForcePerInch * * @param value The unit as PoundsForcePerInch to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromPoundsForcePerInch(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a PoundsForcePerYard * * @param value The unit as PoundsForcePerYard to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromPoundsForcePerYard(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilopoundsForcePerFoot * * @param value The unit as KilopoundsForcePerFoot to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilopoundsForcePerFoot(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilopoundsForcePerInch * * @param value The unit as KilopoundsForcePerInch to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilopoundsForcePerInch(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a NanonewtonsPerMeter * * @param value The unit as NanonewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNanonewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MicronewtonsPerMeter * * @param value The unit as MicronewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMicronewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MillinewtonsPerMeter * * @param value The unit as MillinewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMillinewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a CentinewtonsPerMeter * * @param value The unit as CentinewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromCentinewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecinewtonsPerMeter * * @param value The unit as DecinewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecinewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecanewtonsPerMeter * * @param value The unit as DecanewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecanewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilonewtonsPerMeter * * @param value The unit as KilonewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilonewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MeganewtonsPerMeter * * @param value The unit as MeganewtonsPerMeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMeganewtonsPerMeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a NanonewtonsPerCentimeter * * @param value The unit as NanonewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNanonewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MicronewtonsPerCentimeter * * @param value The unit as MicronewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMicronewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MillinewtonsPerCentimeter * * @param value The unit as MillinewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMillinewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a CentinewtonsPerCentimeter * * @param value The unit as CentinewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromCentinewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecinewtonsPerCentimeter * * @param value The unit as DecinewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecinewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecanewtonsPerCentimeter * * @param value The unit as DecanewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecanewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilonewtonsPerCentimeter * * @param value The unit as KilonewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilonewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MeganewtonsPerCentimeter * * @param value The unit as MeganewtonsPerCentimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMeganewtonsPerCentimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a NanonewtonsPerMillimeter * * @param value The unit as NanonewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromNanonewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MicronewtonsPerMillimeter * * @param value The unit as MicronewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMicronewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MillinewtonsPerMillimeter * * @param value The unit as MillinewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMillinewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a CentinewtonsPerMillimeter * * @param value The unit as CentinewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromCentinewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecinewtonsPerMillimeter * * @param value The unit as DecinewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecinewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a DecanewtonsPerMillimeter * * @param value The unit as DecanewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromDecanewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a KilonewtonsPerMillimeter * * @param value The unit as KilonewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromKilonewtonsPerMillimeter(value: number): ForcePerLength; /** * Create a new ForcePerLength instance from a MeganewtonsPerMillimeter * * @param value The unit as MeganewtonsPerMillimeter to create a new ForcePerLength from. * @returns The new ForcePerLength instance. */ static FromMeganewtonsPerMillimeter(value: number): ForcePerLength; /** * Gets the base unit enumeration associated with ForcePerLength * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ForcePerLengthUnits; /** * 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(): ForcePerLengthUnits.NewtonsPerMeter; /** * Create API DTO represent a ForcePerLength unit. * @param holdInUnit The specific ForcePerLength unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ForcePerLengthUnits): ForcePerLengthDto; /** * Create a ForcePerLength unit from an API DTO representation. * @param dtoForcePerLength The ForcePerLength API DTO representation */ static FromDto(dtoForcePerLength: ForcePerLengthDto): ForcePerLength; /** * Convert ForcePerLength to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ForcePerLengthUnits): number; private convertFromBase; private convertToBase; /** * Format the ForcePerLength to string. * Note! the default format for ForcePerLength is NewtonsPerMeter. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ForcePerLength. * @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 ForcePerLength. */ toString(unit?: ForcePerLengthUnits, options?: number | ToStringOptions): string; /** * Get ForcePerLength unit abbreviation. * Note! the default abbreviation for ForcePerLength is NewtonsPerMeter. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ForcePerLength. * @returns The abbreviation string of ForcePerLength. */ getUnitAbbreviation(unitAbbreviation?: ForcePerLengthUnits): string; /** * Check if the given ForcePerLength are equals to the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns True if the given ForcePerLength are equal to the current ForcePerLength. */ equals(forcePerLength: ForcePerLength): boolean; /** * Compare the given ForcePerLength against the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns 0 if they are equal, -1 if the current ForcePerLength is less then other, 1 if the current ForcePerLength is greater then other. */ compareTo(forcePerLength: ForcePerLength): number; /** * Add the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ add(forcePerLength: ForcePerLength): ForcePerLength; /** * Subtract the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ subtract(forcePerLength: ForcePerLength): ForcePerLength; /** * Multiply the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ multiply(forcePerLength: ForcePerLength): ForcePerLength; /** * Divide the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ divide(forcePerLength: ForcePerLength): ForcePerLength; /** * Modulo the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ modulo(forcePerLength: ForcePerLength): ForcePerLength; /** * Pow the given ForcePerLength with the current ForcePerLength. * @param forcePerLength The other ForcePerLength. * @returns A new ForcePerLength instance with the results. */ pow(forcePerLength: ForcePerLength): ForcePerLength; }