Record TDegreeCelsiusUnitHelper

Unit

Declaration

type TDegreeCelsiusUnitHelper = record helper for TDegreeCelsiusUnit

Description

Record helper for TDegreeCelsiusUnit providing conversion and formatting operations for temperatures expressed in degrees Celsius.

All extraction methods apply the inverse of the Celsius offset conversion, so that a quantity stored internally in kelvin is correctly displayed in °C: T[°C] = T[K] - 273.15.

All ToString and ToVerboseString methods produce output with the Celsius symbol '°C' or name 'degree Celsius' / 'degrees Celsius'.

Overview

Methods

Public function GetName(const Prefixes: TPrefixes): string;
Public function GetPluralName(const Prefixes: TPrefixes): string;
Public function GetSymbol(const Prefixes: TPrefixes): string;
Public function GetValue(const AQuantity: double; const APrefixes: TPrefixes): double;
Public function ToFloat(const AQuantity: TQuantity): double;
Public function ToFloat(const AQuantity: TQuantity; const APrefixes: TPrefixes): double;
Public function ToString(const AQuantity: TQuantity): string;
Public function ToString(const AQuantity: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;
Public function ToString(const AQuantity: TQuantity; const APrefixes: TPrefixes): string;
Public function ToString(const AQuantity, ATolerance: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;
Public function ToVerboseString(const AQuantity: TQuantity): string;
Public function ToVerboseString(const AQuantity: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;
Public function ToVerboseString(const AQuantity: TQuantity; const APrefixes: TPrefixes): string;
Public function ToVerboseString(const AQuantity, ATolerance: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;

Description

Methods

Public function GetName(const Prefixes: TPrefixes): string;

Returns the singular name of the unit with the given prefix applied. For the Celsius unit this is typically 'degree Celsius' without prefix.

Parameters
Prefixes
The list of SI prefixes to prepend to the unit name.
Public function GetPluralName(const Prefixes: TPrefixes): string;

Returns the plural name of the unit with the given prefix applied. For the Celsius unit this is typically 'degrees Celsius' without prefix.

Parameters
Prefixes
The list of SI prefixes to prepend to the unit plural name.
Public function GetSymbol(const Prefixes: TPrefixes): string;

Returns the symbol of the unit with the given prefix applied. For the Celsius unit this is typically '°C' without prefix.

Parameters
Prefixes
The list of SI prefixes to prepend to the unit symbol.
Public function GetValue(const AQuantity: double; const APrefixes: TPrefixes): double;

Returns the real scalar value scaled for the given prefix, expressed in degrees Celsius. Applies the inverse offset: T[°C] = AQuantity - 273.15.

Parameters
AQuantity
The dimensionless real value in SI base units (kelvin) to convert.
APrefixes
The SI prefixes defining additional scaling.
Public function ToFloat(const AQuantity: TQuantity): double;

Returns the numerical value of the real quantity expressed in degrees Celsius. Applies the inverse offset conversion: T[°C] = T[K] - 273.15.

Parameters
AQuantity
The real temperature quantity stored internally in kelvin.
Public function ToFloat(const AQuantity: TQuantity; const APrefixes: TPrefixes): double;

Returns the numerical value of the real quantity expressed in degrees Celsius with the given prefix applied.

Parameters
AQuantity
The real temperature quantity stored internally in kelvin.
APrefixes
The SI prefixes defining additional output scaling.
Public function ToString(const AQuantity: TQuantity): string;

Returns a compact string representation of the temperature quantity in degrees Celsius. Format: '<value> °C', e.g. '100 °C'.

Parameters
AQuantity
The real temperature quantity to format.
Public function ToString(const AQuantity: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;

Returns a compact string representation of the temperature quantity with controlled precision.

Parameters
AQuantity
The real temperature quantity to format.
APrecision
Number of significant digits.
ADigits
Minimum number of digits in the output.
APrefixes
The SI prefixes defining the output scaling.
Public function ToString(const AQuantity: TQuantity; const APrefixes: TPrefixes): string;

Returns a compact string representation of the temperature quantity in degrees Celsius with the given prefix applied.

Parameters
AQuantity
The real temperature quantity to format.
APrefixes
The SI prefixes defining the output scaling.
Public function ToString(const AQuantity, ATolerance: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;

Returns a compact string representation of the temperature quantity with a tolerance range. Format: '<value> ± <tolerance> °C'.

Parameters
AQuantity
The central temperature quantity to format.
ATolerance
The tolerance quantity to display alongside the value.
APrecision
Number of significant digits.
ADigits
Minimum number of digits in the output.
APrefixes
The SI prefixes defining the output scaling.
Public function ToVerboseString(const AQuantity: TQuantity): string;

Returns a verbose string representation of the temperature quantity in degrees Celsius. Format: '<value> degrees Celsius', e.g. '100 degrees Celsius'.

Parameters
AQuantity
The real temperature quantity to format.
Public function ToVerboseString(const AQuantity: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;

Returns a verbose string representation of the temperature quantity with controlled precision.

Parameters
AQuantity
The real temperature quantity to format.
APrecision
Number of significant digits.
ADigits
Minimum number of digits in the output.
APrefixes
The SI prefixes defining the output scaling.
Public function ToVerboseString(const AQuantity: TQuantity; const APrefixes: TPrefixes): string;

Returns a verbose string representation of the temperature quantity with the given prefix.

Parameters
AQuantity
The real temperature quantity to format.
APrefixes
The SI prefixes defining the output scaling.
Public function ToVerboseString(const AQuantity, ATolerance: TQuantity; APrecision, ADigits: longint; const APrefixes: TPrefixes): string;

Returns a verbose string representation of the temperature quantity with a tolerance range. Format: '<value> ± <tolerance> degrees Celsius'.

Parameters
AQuantity
The central temperature quantity to format.
ATolerance
The tolerance quantity to display alongside the value.
APrecision
Number of significant digits.
ADigits
Minimum number of digits in the output.
APrefixes
The SI prefixes defining the output scaling.

Generated by PasDoc 1.0.4.