Class ExMConditionals
See ExM. This class contains functions related to conditionals.
Inheritance
System.Object
ExMConditionals
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public static class ExMConditionals
Methods
If<T>(tbool, TEx<T>, TEx<T>)
If the predicate is true, return the true branch, otherwise the false branch.
Declaration
public static TEx<T> If<T>(tbool pred, TEx<T> iftrue, TEx<T> iffalse)
Parameters
Type |
Name |
Description |
tbool |
pred |
|
TEx<T> |
iftrue |
|
TEx<T> |
iffalse |
|
Returns
Type Parameters
If0<T>(tfloat, TEx<T>)
If the switcher is zero, return the result, otherwise the default value.
Declaration
public static TEx<T> If0<T>(tfloat switcher, TEx<T> result)
Parameters
Type |
Name |
Description |
tfloat |
switcher |
|
TEx<T> |
result |
|
Returns
Type Parameters
If1<T>(tfloat, TEx<T>)
If the switcher is 1, return the result, otherwise the default value.
Declaration
public static TEx<T> If1<T>(tfloat switcher, TEx<T> result)
Parameters
Type |
Name |
Description |
tfloat |
switcher |
|
TEx<T> |
result |
|
Returns
Type Parameters
IfN0<T>(tfloat, TEx<T>)
If the switcher is nonzero, return the result, otherwise the default value.
Declaration
public static TEx<T> IfN0<T>(tfloat switcher, TEx<T> result)
Parameters
Type |
Name |
Description |
tfloat |
switcher |
|
TEx<T> |
result |
|
Returns
Type Parameters
IfN1<T>(tfloat, TEx<T>)
If the switcher is not 1, return the result, otherwise the default value.
Declaration
public static TEx<T> IfN1<T>(tfloat switcher, TEx<T> result)
Parameters
Type |
Name |
Description |
tfloat |
switcher |
|
TEx<T> |
result |
|
Returns
Type Parameters
Pred10(tbool)
Convert a boolean into a 1/0 value.
Declaration
public static tfloat Pred10(tbool pred)
Parameters
Type |
Name |
Description |
tbool |
pred |
|
Returns