Example #1
0
        public static float Round(this RoundingOptions roundingOptions, float value)
        {
            switch (roundingOptions)
            {
            case RoundingOptions.Default:
                return((int)value);

            case RoundingOptions.Floor:
                return(FlaiMath.Floor(value));

            case RoundingOptions.Ceiling:
                return(FlaiMath.Ceiling(value));

            case RoundingOptions.Round:
                return(FlaiMath.Round(value));

            default:
                throw new ArgumentException("roundingOptions");
            }
        }
Example #2
0
 public static Vector3i Floor(Vector3 vec)
 {
     return(new Vector3i((int)FlaiMath.Floor(vec.x), (int)FlaiMath.Floor(vec.y), (int)FlaiMath.Floor(vec.z)));
 }