UNPKG

unitsnet-js

Version:

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

159 lines (158 loc) 8.81 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a ElectricSurfaceChargeDensity */ export interface ElectricSurfaceChargeDensityDto { /** The value of the ElectricSurfaceChargeDensity */ value: number; /** The specific unit that the ElectricSurfaceChargeDensity value is representing */ unit: ElectricSurfaceChargeDensityUnits; } /** ElectricSurfaceChargeDensityUnits enumeration */ export declare enum ElectricSurfaceChargeDensityUnits { /** */ CoulombsPerSquareMeter = "CoulombPerSquareMeter", /** */ CoulombsPerSquareCentimeter = "CoulombPerSquareCentimeter", /** */ CoulombsPerSquareInch = "CoulombPerSquareInch" } /** In electromagnetism, surface charge density is a measure of the amount of electric charge per surface area. */ export declare class ElectricSurfaceChargeDensity extends BaseUnit { protected value: number; private coulombspersquaremeterLazy; private coulombspersquarecentimeterLazy; private coulombspersquareinchLazy; /** * Create a new ElectricSurfaceChargeDensity. * @param value The value. * @param fromUnit The ‘ElectricSurfaceChargeDensity’ unit to create from. * The default unit is CoulombsPerSquareMeter */ constructor(value: number, fromUnit?: ElectricSurfaceChargeDensityUnits); /** * The base value of ElectricSurfaceChargeDensity is CoulombsPerSquareMeter. * 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(): ElectricSurfaceChargeDensityUnits.CoulombsPerSquareMeter; /** */ get CoulombsPerSquareMeter(): number; /** */ get CoulombsPerSquareCentimeter(): number; /** */ get CoulombsPerSquareInch(): number; /** * Create a new ElectricSurfaceChargeDensity instance from a CoulombsPerSquareMeter * * @param value The unit as CoulombsPerSquareMeter to create a new ElectricSurfaceChargeDensity from. * @returns The new ElectricSurfaceChargeDensity instance. */ static FromCoulombsPerSquareMeter(value: number): ElectricSurfaceChargeDensity; /** * Create a new ElectricSurfaceChargeDensity instance from a CoulombsPerSquareCentimeter * * @param value The unit as CoulombsPerSquareCentimeter to create a new ElectricSurfaceChargeDensity from. * @returns The new ElectricSurfaceChargeDensity instance. */ static FromCoulombsPerSquareCentimeter(value: number): ElectricSurfaceChargeDensity; /** * Create a new ElectricSurfaceChargeDensity instance from a CoulombsPerSquareInch * * @param value The unit as CoulombsPerSquareInch to create a new ElectricSurfaceChargeDensity from. * @returns The new ElectricSurfaceChargeDensity instance. */ static FromCoulombsPerSquareInch(value: number): ElectricSurfaceChargeDensity; /** * Gets the base unit enumeration associated with ElectricSurfaceChargeDensity * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ElectricSurfaceChargeDensityUnits; /** * 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(): ElectricSurfaceChargeDensityUnits.CoulombsPerSquareMeter; /** * Create API DTO represent a ElectricSurfaceChargeDensity unit. * @param holdInUnit The specific ElectricSurfaceChargeDensity unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ElectricSurfaceChargeDensityUnits): ElectricSurfaceChargeDensityDto; /** * Create a ElectricSurfaceChargeDensity unit from an API DTO representation. * @param dtoElectricSurfaceChargeDensity The ElectricSurfaceChargeDensity API DTO representation */ static FromDto(dtoElectricSurfaceChargeDensity: ElectricSurfaceChargeDensityDto): ElectricSurfaceChargeDensity; /** * Convert ElectricSurfaceChargeDensity to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ElectricSurfaceChargeDensityUnits): number; private convertFromBase; private convertToBase; /** * Format the ElectricSurfaceChargeDensity to string. * Note! the default format for ElectricSurfaceChargeDensity is CoulombsPerSquareMeter. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ElectricSurfaceChargeDensity. * @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 ElectricSurfaceChargeDensity. */ toString(unit?: ElectricSurfaceChargeDensityUnits, options?: number | ToStringOptions): string; /** * Get ElectricSurfaceChargeDensity unit abbreviation. * Note! the default abbreviation for ElectricSurfaceChargeDensity is CoulombsPerSquareMeter. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ElectricSurfaceChargeDensity. * @returns The abbreviation string of ElectricSurfaceChargeDensity. */ getUnitAbbreviation(unitAbbreviation?: ElectricSurfaceChargeDensityUnits): string; /** * Check if the given ElectricSurfaceChargeDensity are equals to the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns True if the given ElectricSurfaceChargeDensity are equal to the current ElectricSurfaceChargeDensity. */ equals(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): boolean; /** * Compare the given ElectricSurfaceChargeDensity against the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns 0 if they are equal, -1 if the current ElectricSurfaceChargeDensity is less then other, 1 if the current ElectricSurfaceChargeDensity is greater then other. */ compareTo(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): number; /** * Add the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ add(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; /** * Subtract the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ subtract(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; /** * Multiply the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ multiply(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; /** * Divide the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ divide(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; /** * Modulo the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ modulo(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; /** * Pow the given ElectricSurfaceChargeDensity with the current ElectricSurfaceChargeDensity. * @param electricSurfaceChargeDensity The other ElectricSurfaceChargeDensity. * @returns A new ElectricSurfaceChargeDensity instance with the results. */ pow(electricSurfaceChargeDensity: ElectricSurfaceChargeDensity): ElectricSurfaceChargeDensity; }