private CryptoPositionSide ConvertSide(double?amount) { if (!amount.HasValue || CryptoMathUtils.IsSame(amount.Value, 0)) { return(CryptoPositionSide.Undefined); } return(amount.Value >= 0 ? CryptoPositionSide.Long : CryptoPositionSide.Short); }
public void IsSame_DifferentValues_ShouldReturnFalse(double first, double second) { Assert.False(CryptoMathUtils.IsSame(first, second)); }
public void IsSame_SameValues_ShouldReturnTrue(double first, double second) { Assert.True(CryptoMathUtils.IsSame(first, second)); }