C# Class Porrey.Uwp.IoT.Calibration.NumericExtensions

Afficher le fichier Open project: porrey/iot

Méthodes publiques

Méthode Description
AsRange ( this value, float minimumValue, float maximumValue ) : float

Returns the value within the range specified.

AsRange ( this value, int minimumValue, int maximumValue ) : int

Returns the value within the range specified.

AsScaledValue ( this value, float maximumValue ) : float

Returns the value read from the channel as a scaled against the specified maximum value.

AsScaledValue ( this value, int maximumValue ) : int

Returns the value read from the channel as a scaled against the specified maximum value.

Maximum ( this value, float maximumValue ) : float

Returns a value that is never larger than maximumValue.

Maximum ( this value, int maximumValue ) : int

Returns a value that is never larger than maximum.

Minimum ( this value, float minimumValue ) : float

Returns a value that is never smaller than minimumValue.

Minimum ( this value, int minimumValue ) : int

Returns a value that is never smaller than minimumValue.

Normalize ( this value, float maximumValue ) : float

Normalzies value to a number between 0 and 1.

WithCalibration ( this value, float calibratedMaximum ) : float

Returns an adjusted value based on a calibration done to determine the maximum value of the device.

Method Details

AsRange() public static méthode

Returns the value within the range specified.
public static AsRange ( this value, float minimumValue, float maximumValue ) : float
value this
minimumValue float The lower end of the range and the minimum value returned.
maximumValue float The upper end of the range and the maximum value returned.
Résultat float

AsRange() public static méthode

Returns the value within the range specified.
public static AsRange ( this value, int minimumValue, int maximumValue ) : int
value this
minimumValue int The lower end of the range and the minimum value returned.
maximumValue int The upper end of the range and the maximum value returned.
Résultat int

AsScaledValue() public static méthode

Returns the value read from the channel as a scaled against the specified maximum value.
public static AsScaledValue ( this value, float maximumValue ) : float
value this
maximumValue float The largest allowed value.
Résultat float

AsScaledValue() public static méthode

Returns the value read from the channel as a scaled against the specified maximum value.
public static AsScaledValue ( this value, int maximumValue ) : int
value this
maximumValue int The largest allowed value.
Résultat int

Maximum() public static méthode

Returns a value that is never larger than maximumValue.
public static Maximum ( this value, float maximumValue ) : float
value this The value that is limited.
maximumValue float The maximum value.
Résultat float

Maximum() public static méthode

Returns a value that is never larger than maximum.
public static Maximum ( this value, int maximumValue ) : int
value this The value that is limited.
maximumValue int The maximum value.
Résultat int

Minimum() public static méthode

Returns a value that is never smaller than minimumValue.
public static Minimum ( this value, float minimumValue ) : float
value this The value that is limited.
minimumValue float
Résultat float

Minimum() public static méthode

Returns a value that is never smaller than minimumValue.
public static Minimum ( this value, int minimumValue ) : int
value this The value that is limited.
minimumValue int
Résultat int

Normalize() public static méthode

Normalzies value to a number between 0 and 1.
public static Normalize ( this value, float maximumValue ) : float
value this The value to be normalized.
maximumValue float The maximum of value.
Résultat float

WithCalibration() public static méthode

Returns an adjusted value based on a calibration done to determine the maximum value of the device.
public static WithCalibration ( this value, float calibratedMaximum ) : float
value this The sensor reading to be calibrated.
calibratedMaximum float The maximum value based on calibration of the sensor.
Résultat float