UNPKG

unitsnet-js

Version:

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

255 lines (254 loc) 10.9 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a ReciprocalArea */ export interface ReciprocalAreaDto { /** The value of the ReciprocalArea */ value: number; /** The specific unit that the ReciprocalArea value is representing */ unit: ReciprocalAreaUnits; } /** ReciprocalAreaUnits enumeration */ export declare enum ReciprocalAreaUnits { /** */ InverseSquareMeters = "InverseSquareMeter", /** */ InverseSquareKilometers = "InverseSquareKilometer", /** */ InverseSquareDecimeters = "InverseSquareDecimeter", /** */ InverseSquareCentimeters = "InverseSquareCentimeter", /** */ InverseSquareMillimeters = "InverseSquareMillimeter", /** */ InverseSquareMicrometers = "InverseSquareMicrometer", /** */ InverseSquareMiles = "InverseSquareMile", /** */ InverseSquareYards = "InverseSquareYard", /** */ InverseSquareFeet = "InverseSquareFoot", /** */ InverseUsSurveySquareFeet = "InverseUsSurveySquareFoot", /** */ InverseSquareInches = "InverseSquareInch" } /** Reciprocal area (Inverse-square) quantity is used to specify a physical quantity inversely proportional to the square of the distance. */ export declare class ReciprocalArea extends BaseUnit { protected value: number; private inversesquaremetersLazy; private inversesquarekilometersLazy; private inversesquaredecimetersLazy; private inversesquarecentimetersLazy; private inversesquaremillimetersLazy; private inversesquaremicrometersLazy; private inversesquaremilesLazy; private inversesquareyardsLazy; private inversesquarefeetLazy; private inverseussurveysquarefeetLazy; private inversesquareinchesLazy; /** * Create a new ReciprocalArea. * @param value The value. * @param fromUnit The ‘ReciprocalArea’ unit to create from. * The default unit is InverseSquareMeters */ constructor(value: number, fromUnit?: ReciprocalAreaUnits); /** * The base value of ReciprocalArea is InverseSquareMeters. * 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(): ReciprocalAreaUnits.InverseSquareMeters; /** */ get InverseSquareMeters(): number; /** */ get InverseSquareKilometers(): number; /** */ get InverseSquareDecimeters(): number; /** */ get InverseSquareCentimeters(): number; /** */ get InverseSquareMillimeters(): number; /** */ get InverseSquareMicrometers(): number; /** */ get InverseSquareMiles(): number; /** */ get InverseSquareYards(): number; /** */ get InverseSquareFeet(): number; /** */ get InverseUsSurveySquareFeet(): number; /** */ get InverseSquareInches(): number; /** * Create a new ReciprocalArea instance from a InverseSquareMeters * * @param value The unit as InverseSquareMeters to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareMeters(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareKilometers * * @param value The unit as InverseSquareKilometers to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareKilometers(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareDecimeters * * @param value The unit as InverseSquareDecimeters to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareDecimeters(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareCentimeters * * @param value The unit as InverseSquareCentimeters to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareCentimeters(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareMillimeters * * @param value The unit as InverseSquareMillimeters to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareMillimeters(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareMicrometers * * @param value The unit as InverseSquareMicrometers to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareMicrometers(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareMiles * * @param value The unit as InverseSquareMiles to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareMiles(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareYards * * @param value The unit as InverseSquareYards to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareYards(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareFeet * * @param value The unit as InverseSquareFeet to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareFeet(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseUsSurveySquareFeet * * @param value The unit as InverseUsSurveySquareFeet to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseUsSurveySquareFeet(value: number): ReciprocalArea; /** * Create a new ReciprocalArea instance from a InverseSquareInches * * @param value The unit as InverseSquareInches to create a new ReciprocalArea from. * @returns The new ReciprocalArea instance. */ static FromInverseSquareInches(value: number): ReciprocalArea; /** * Gets the base unit enumeration associated with ReciprocalArea * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ReciprocalAreaUnits; /** * 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(): ReciprocalAreaUnits.InverseSquareMeters; /** * Create API DTO represent a ReciprocalArea unit. * @param holdInUnit The specific ReciprocalArea unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ReciprocalAreaUnits): ReciprocalAreaDto; /** * Create a ReciprocalArea unit from an API DTO representation. * @param dtoReciprocalArea The ReciprocalArea API DTO representation */ static FromDto(dtoReciprocalArea: ReciprocalAreaDto): ReciprocalArea; /** * Convert ReciprocalArea to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ReciprocalAreaUnits): number; private convertFromBase; private convertToBase; /** * Format the ReciprocalArea to string. * Note! the default format for ReciprocalArea is InverseSquareMeters. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ReciprocalArea. * @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 ReciprocalArea. */ toString(unit?: ReciprocalAreaUnits, options?: number | ToStringOptions): string; /** * Get ReciprocalArea unit abbreviation. * Note! the default abbreviation for ReciprocalArea is InverseSquareMeters. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ReciprocalArea. * @returns The abbreviation string of ReciprocalArea. */ getUnitAbbreviation(unitAbbreviation?: ReciprocalAreaUnits): string; /** * Check if the given ReciprocalArea are equals to the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns True if the given ReciprocalArea are equal to the current ReciprocalArea. */ equals(reciprocalArea: ReciprocalArea): boolean; /** * Compare the given ReciprocalArea against the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns 0 if they are equal, -1 if the current ReciprocalArea is less then other, 1 if the current ReciprocalArea is greater then other. */ compareTo(reciprocalArea: ReciprocalArea): number; /** * Add the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ add(reciprocalArea: ReciprocalArea): ReciprocalArea; /** * Subtract the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ subtract(reciprocalArea: ReciprocalArea): ReciprocalArea; /** * Multiply the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ multiply(reciprocalArea: ReciprocalArea): ReciprocalArea; /** * Divide the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ divide(reciprocalArea: ReciprocalArea): ReciprocalArea; /** * Modulo the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ modulo(reciprocalArea: ReciprocalArea): ReciprocalArea; /** * Pow the given ReciprocalArea with the current ReciprocalArea. * @param reciprocalArea The other ReciprocalArea. * @returns A new ReciprocalArea instance with the results. */ pow(reciprocalArea: ReciprocalArea): ReciprocalArea; }