Class DivideTerm
Term representing the division operator -- divides the first term by the second.
Implements
Inherited Members
Namespace: GoRogue.DiceNotation.Terms
Assembly: GoRogue.dll
Syntax
[DataContract]
public class DivideTerm : ITerm
Constructors
View SourceDivideTerm(ITerm, ITerm)
Constructor. Takes the two terms to divide.
Declaration
public DivideTerm(ITerm term1, ITerm term2)
Parameters
Type | Name | Description |
---|---|---|
ITerm | term1 | The first term (left-hand side). |
ITerm | term2 | The second term (right-hand side). |
Fields
View SourceTerm1
The first term (left-hand side).
Declaration
[DataMember]
public readonly ITerm Term1
Field Value
Type | Description |
---|---|
ITerm |
Term2
The second term (right-hand side).
Declaration
[DataMember]
public readonly ITerm Term2
Field Value
Type | Description |
---|---|
ITerm |
Methods
View SourceGetResult(IEnhancedRandom)
Divides the first term by the second, evaluating those two terms as necessary.
Declaration
public int GetResult(IEnhancedRandom rng)
Parameters
Type | Name | Description |
---|---|---|
IEnhancedRandom | rng | The rng to used -- passed to other terms. |
Returns
Type | Description |
---|---|
int |
ToString()
Returns a parenthesized string representing the operation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A parenthesized string representing the operation. |