Difference between revisions of "Extensions.Util.Min"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
{{DISPLAYTITLE:  '''Max'''}}[[Category:Util]]
+
{{DISPLAYTITLE:  '''Min'''}}[[Category:Util]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | Max |Gets the max of all its operands. | [[Term]] | [[Extensions.Util|OTX Util extension]] | [[Extensions.Util#Terms|Util related terms]] | - | - }}
+
{{ClassificationActivity | Min|Gets the min of all operands. | [[Term]] | [[Extensions.Util|OTX Util extension]] | [[Extensions.Util#Terms|Util related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
NumericTerm = Util.Max(NumericTerm);
+
NumericTerm = Util.Min(NumericTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The OTX '''Max''' term is a NumericTerm which returns the max of all its operands.
+
The OTX '''Min''' term is a NumericTerm which returns the '''Min''' of all its operands.
  
{{Note|IMPORTANT — The actual return data type of the '''Max''' term depends on the data types of the operands: If one of the operands is Float, all Integer operands are automatically promoted to Float prior to the operation and the returned value is Float. Otherwise, the returned value is Integer.}}
+
{{Note|IMPORTANT — The actual return data type of the '''Min''' term depends on the data types of the operands: If one of the operands is Float, all Integer operands are automatically promoted to Float prior to the operation and the returned value is Float. Otherwise, the returned value is Integer.}}
  
{{TermReturnValue| [[Numeric]] | The max of all its operands.}}
+
{{TermReturnValue| [[Numeric]] | The min of all its operands.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie2| Numeral | [[Numeric]] | [[Term]] | - | [2..*] | The numeric operands of the Max Term.}}
+
{{TableRowPropertie2| Numeral | [[Numeric]] | [[Term]] | - | [2..*] | The numeric operands of the Min Term.}}
 
|}
 
|}
  
Line 27: Line 27:
 
/// Flow
 
/// Flow
  
Float1 = Util.Max({0.99, 0.97, 0.93, 0.91, 0.9});
+
Float1 = Util.Min({0.99, 0.97, 0.93, 0.91, 0.9});
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 08:35, 5 October 2018

Classification

Name Min
Short Description Gets the min of all operands.
Class Term
Extension OTX Util extension
Group Util related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

NumericTerm = Util.Min(NumericTerm);

Description

The OTX Min term is a NumericTerm which returns the Min of all its operands.

Icons Note.png IMPORTANT — The actual return data type of the Min term depends on the data types of the operands: If one of the operands is Float, all Integer operands are automatically promoted to Float prior to the operation and the returned value is Float. Otherwise, the returned value is Integer.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Numeric The min of all its operands.

Properties

Name Data Type Class Default Cardinality Description
Numeral Numeric Term - [2..*] The numeric operands of the Min Term.

OTL Examples

Float Float1;

/// Flow

Float1 = Util.Min({0.99, 0.97, 0.93, 0.91, 0.9});

See also

Compare
CopyByteField
GetRandomNumber
IsInitialized
ListIndexOf
ListIndexOfAny
ListReverse
ListSort
Max
StringFormat