using UnityEngine;
namespace UnityAtoms.BaseAtoms
{
///
/// Variable of type `float`. Inherits from `EquatableAtomVariable<float, FloatPair, FloatEvent, FloatPairEvent, FloatFloatFunction>`.
///
[EditorIcon("atom-icon-lush")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Float", fileName = "FloatVariable")]
public sealed class FloatVariable : EquatableAtomVariable
{
///
/// Add value to Variable.
///
/// Value to add.
public void Add(float value) => Value += value;
///
/// Add variable value to Variable.
///
/// Variable with value to add.
public void Add(AtomBaseVariable variable) => Add(variable.Value);
///
/// Subtract value from Variable.
///
/// Value to subtract.
public void Subtract(float value) => Value -= value;
///
/// Subtract variable value from Variable.
///
/// Variable with value to subtract.
public void Subtract(AtomBaseVariable variable) => Subtract(variable.Value);
///
/// Multiply variable by value.
///
/// Value to multiple by.
public void MultiplyBy(float value) => Value *= value;
///
/// Multiply variable by Variable value.
///
/// Variable with value to multiple by.
public void MultiplyBy(AtomBaseVariable variable) => MultiplyBy(variable.Value);
///
/// Divide Variable by value.
///
/// Value to divide by.
public void DivideBy(float value) => Value /= value;
///
/// Divide Variable by Variable value.
///
/// Variable value to divide by.
public void DivideBy(AtomBaseVariable variable) => DivideBy(variable.Value);
}
}