UNPKG

unitsnet-js

Version:

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

339 lines (338 loc) 13.3 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a HeatFlux */ export interface HeatFluxDto { /** The value of the HeatFlux */ value: number; /** The specific unit that the HeatFlux value is representing */ unit: HeatFluxUnits; } /** HeatFluxUnits enumeration */ export declare enum HeatFluxUnits { /** */ WattsPerSquareMeter = "WattPerSquareMeter", /** */ WattsPerSquareInch = "WattPerSquareInch", /** */ WattsPerSquareFoot = "WattPerSquareFoot", /** */ BtusPerSecondSquareInch = "BtuPerSecondSquareInch", /** */ BtusPerSecondSquareFoot = "BtuPerSecondSquareFoot", /** */ BtusPerMinuteSquareFoot = "BtuPerMinuteSquareFoot", /** */ BtusPerHourSquareFoot = "BtuPerHourSquareFoot", /** */ CaloriesPerSecondSquareCentimeter = "CaloriePerSecondSquareCentimeter", /** */ KilocaloriesPerHourSquareMeter = "KilocaloriePerHourSquareMeter", /** */ PoundsForcePerFootSecond = "PoundForcePerFootSecond", /** */ PoundsPerSecondCubed = "PoundPerSecondCubed", /** */ NanowattsPerSquareMeter = "NanowattPerSquareMeter", /** */ MicrowattsPerSquareMeter = "MicrowattPerSquareMeter", /** */ MilliwattsPerSquareMeter = "MilliwattPerSquareMeter", /** */ CentiwattsPerSquareMeter = "CentiwattPerSquareMeter", /** */ DeciwattsPerSquareMeter = "DeciwattPerSquareMeter", /** */ KilowattsPerSquareMeter = "KilowattPerSquareMeter", /** */ KilocaloriesPerSecondSquareCentimeter = "KilocaloriePerSecondSquareCentimeter" } /** Heat flux is the flow of energy per unit of area per unit of time */ export declare class HeatFlux extends BaseUnit { protected value: number; private wattspersquaremeterLazy; private wattspersquareinchLazy; private wattspersquarefootLazy; private btuspersecondsquareinchLazy; private btuspersecondsquarefootLazy; private btusperminutesquarefootLazy; private btusperhoursquarefootLazy; private caloriespersecondsquarecentimeterLazy; private kilocaloriesperhoursquaremeterLazy; private poundsforceperfootsecondLazy; private poundspersecondcubedLazy; private nanowattspersquaremeterLazy; private microwattspersquaremeterLazy; private milliwattspersquaremeterLazy; private centiwattspersquaremeterLazy; private deciwattspersquaremeterLazy; private kilowattspersquaremeterLazy; private kilocaloriespersecondsquarecentimeterLazy; /** * Create a new HeatFlux. * @param value The value. * @param fromUnit The ‘HeatFlux’ unit to create from. * The default unit is WattsPerSquareMeter */ constructor(value: number, fromUnit?: HeatFluxUnits); /** * The base value of HeatFlux is WattsPerSquareMeter. * 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(): HeatFluxUnits.WattsPerSquareMeter; /** */ get WattsPerSquareMeter(): number; /** */ get WattsPerSquareInch(): number; /** */ get WattsPerSquareFoot(): number; /** */ get BtusPerSecondSquareInch(): number; /** */ get BtusPerSecondSquareFoot(): number; /** */ get BtusPerMinuteSquareFoot(): number; /** */ get BtusPerHourSquareFoot(): number; /** */ get CaloriesPerSecondSquareCentimeter(): number; /** */ get KilocaloriesPerHourSquareMeter(): number; /** */ get PoundsForcePerFootSecond(): number; /** */ get PoundsPerSecondCubed(): number; /** */ get NanowattsPerSquareMeter(): number; /** */ get MicrowattsPerSquareMeter(): number; /** */ get MilliwattsPerSquareMeter(): number; /** */ get CentiwattsPerSquareMeter(): number; /** */ get DeciwattsPerSquareMeter(): number; /** */ get KilowattsPerSquareMeter(): number; /** */ get KilocaloriesPerSecondSquareCentimeter(): number; /** * Create a new HeatFlux instance from a WattsPerSquareMeter * * @param value The unit as WattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromWattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a WattsPerSquareInch * * @param value The unit as WattsPerSquareInch to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromWattsPerSquareInch(value: number): HeatFlux; /** * Create a new HeatFlux instance from a WattsPerSquareFoot * * @param value The unit as WattsPerSquareFoot to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromWattsPerSquareFoot(value: number): HeatFlux; /** * Create a new HeatFlux instance from a BtusPerSecondSquareInch * * @param value The unit as BtusPerSecondSquareInch to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromBtusPerSecondSquareInch(value: number): HeatFlux; /** * Create a new HeatFlux instance from a BtusPerSecondSquareFoot * * @param value The unit as BtusPerSecondSquareFoot to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromBtusPerSecondSquareFoot(value: number): HeatFlux; /** * Create a new HeatFlux instance from a BtusPerMinuteSquareFoot * * @param value The unit as BtusPerMinuteSquareFoot to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromBtusPerMinuteSquareFoot(value: number): HeatFlux; /** * Create a new HeatFlux instance from a BtusPerHourSquareFoot * * @param value The unit as BtusPerHourSquareFoot to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromBtusPerHourSquareFoot(value: number): HeatFlux; /** * Create a new HeatFlux instance from a CaloriesPerSecondSquareCentimeter * * @param value The unit as CaloriesPerSecondSquareCentimeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromCaloriesPerSecondSquareCentimeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a KilocaloriesPerHourSquareMeter * * @param value The unit as KilocaloriesPerHourSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromKilocaloriesPerHourSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a PoundsForcePerFootSecond * * @param value The unit as PoundsForcePerFootSecond to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromPoundsForcePerFootSecond(value: number): HeatFlux; /** * Create a new HeatFlux instance from a PoundsPerSecondCubed * * @param value The unit as PoundsPerSecondCubed to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromPoundsPerSecondCubed(value: number): HeatFlux; /** * Create a new HeatFlux instance from a NanowattsPerSquareMeter * * @param value The unit as NanowattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromNanowattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a MicrowattsPerSquareMeter * * @param value The unit as MicrowattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromMicrowattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a MilliwattsPerSquareMeter * * @param value The unit as MilliwattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromMilliwattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a CentiwattsPerSquareMeter * * @param value The unit as CentiwattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromCentiwattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a DeciwattsPerSquareMeter * * @param value The unit as DeciwattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromDeciwattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a KilowattsPerSquareMeter * * @param value The unit as KilowattsPerSquareMeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromKilowattsPerSquareMeter(value: number): HeatFlux; /** * Create a new HeatFlux instance from a KilocaloriesPerSecondSquareCentimeter * * @param value The unit as KilocaloriesPerSecondSquareCentimeter to create a new HeatFlux from. * @returns The new HeatFlux instance. */ static FromKilocaloriesPerSecondSquareCentimeter(value: number): HeatFlux; /** * Gets the base unit enumeration associated with HeatFlux * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof HeatFluxUnits; /** * 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(): HeatFluxUnits.WattsPerSquareMeter; /** * Create API DTO represent a HeatFlux unit. * @param holdInUnit The specific HeatFlux unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: HeatFluxUnits): HeatFluxDto; /** * Create a HeatFlux unit from an API DTO representation. * @param dtoHeatFlux The HeatFlux API DTO representation */ static FromDto(dtoHeatFlux: HeatFluxDto): HeatFlux; /** * Convert HeatFlux to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: HeatFluxUnits): number; private convertFromBase; private convertToBase; /** * Format the HeatFlux to string. * Note! the default format for HeatFlux is WattsPerSquareMeter. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the HeatFlux. * @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 HeatFlux. */ toString(unit?: HeatFluxUnits, options?: number | ToStringOptions): string; /** * Get HeatFlux unit abbreviation. * Note! the default abbreviation for HeatFlux is WattsPerSquareMeter. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the HeatFlux. * @returns The abbreviation string of HeatFlux. */ getUnitAbbreviation(unitAbbreviation?: HeatFluxUnits): string; /** * Check if the given HeatFlux are equals to the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns True if the given HeatFlux are equal to the current HeatFlux. */ equals(heatFlux: HeatFlux): boolean; /** * Compare the given HeatFlux against the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns 0 if they are equal, -1 if the current HeatFlux is less then other, 1 if the current HeatFlux is greater then other. */ compareTo(heatFlux: HeatFlux): number; /** * Add the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ add(heatFlux: HeatFlux): HeatFlux; /** * Subtract the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ subtract(heatFlux: HeatFlux): HeatFlux; /** * Multiply the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ multiply(heatFlux: HeatFlux): HeatFlux; /** * Divide the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ divide(heatFlux: HeatFlux): HeatFlux; /** * Modulo the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ modulo(heatFlux: HeatFlux): HeatFlux; /** * Pow the given HeatFlux with the current HeatFlux. * @param heatFlux The other HeatFlux. * @returns A new HeatFlux instance with the results. */ pow(heatFlux: HeatFlux): HeatFlux; }