public static object ToInt(decimal self) { decimal rounded; if (self >= 0) { rounded = Decimal.Floor(self); } else { rounded = Decimal.Ceiling(self); } return Protocols.Normalize(rounded); }