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"); } }
public static Vector3i Floor(Vector3 vec) { return(new Vector3i((int)FlaiMath.Floor(vec.x), (int)FlaiMath.Floor(vec.y), (int)FlaiMath.Floor(vec.z))); }