namespace Chernobyl.Calculator
{
///
/// Provides a base class for classes that can do
/// calculations on types. This class was created to
/// get around C#'s generic operator problem.
///
/// The type having calculations done on it.
public interface ICalculator
{
///
/// Adds one object to another.
///
/// The left side of the addition operation.
/// The right side of the addition operation.
/// The result of the addition.
T Add(T left, T right);
///
/// Subtracts one object from another.
///
/// The left side of the subtraction operation.
/// The right side of the subtraction operation.
/// The result of the subtraction.
T Subtract(T left, T right);
///
/// Divides two objects.
///
/// The dividend.
/// The divisor.
/// The result of the divide.
T Divide(T dividend, T divisor);
///
/// Multiplies two objects together.
///
/// The left side of the multiplication operation.
/// The right side of the multiplication operation.
/// The result of the multiplication.
T Multiply(T left, T right);
///
/// Negates an object.
///
/// The item to negate.
/// The result of the negation.
T Negate(T item);
///
/// Compares two objects.
///
/// The left side of the comparison operation.
/// The right side of the comparison operation.
/// True if the two are the same, false if otherwise.
bool Compare(T left, T right);
}
}