Show / Hide Table of Contents

Class MultiplyTerm

Term representing the multiplication operator -- multiplies Term1 and Term2.

Inheritance
System.Object
MultiplyTerm
Implements
ITerm
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: GoRogue.DiceNotation.Terms
Assembly: GoRogue.dll
Syntax
public class MultiplyTerm : ITerm

Constructors

| Improve this Doc View Source

MultiplyTerm(ITerm, ITerm)

Constructor. Takes the terms that will be multiplied.

Declaration
public MultiplyTerm(ITerm term1, ITerm term2)
Parameters
Type Name Description
ITerm term1

The first term (left-hand side).

ITerm term2

The second term (left-hand side).

Properties

| Improve this Doc View Source

Term1

The first term (left-hand side).

Declaration
public ITerm Term1 { get; }
Property Value
Type Description
ITerm
| Improve this Doc View Source

Term2

The second term (right-hand side).

Declaration
public ITerm Term2 { get; }
Property Value
Type Description
ITerm

Methods

| Improve this Doc View Source

GetResult(IGenerator)

Multiplies the first term by the second, evaluating those two terms as necessary.

Declaration
public int GetResult(IGenerator rng)
Parameters
Type Name Description
Troschuetz.Random.IGenerator rng

The rng to used -- passed to other terms.

Returns
Type Description
System.Int32

The result of evaluating Term1 * Term2.

| Improve this Doc View Source

ToString()

Returns a parenthesized string representing the term.

Declaration
public override string ToString()
Returns
Type Description
System.String

A parenthesized string representing the term.

Overrides
System.Object.ToString()

Implements

ITerm

Extension Methods

Utility.Yield<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX