Too many functions were performing essentially the same service: rounding ticks. It was confusing.
18 lines
365 B
C#
18 lines
365 B
C#
#nullable enable
|
|
|
|
namespace Spark.Core.Math;
|
|
|
|
public enum RoundingMode {
|
|
None,
|
|
// Round to the closest integer (up if decimal part is >= 0.5, otherwise down)
|
|
Closest,
|
|
// Round up
|
|
Up,
|
|
// Round down
|
|
Down,
|
|
// Round positive numbers up, and negative numbers down
|
|
AbsUp,
|
|
// Round positive numbers down, and negative numbers up
|
|
AbsDown
|
|
}
|