C# Math.Round的枚举参数

public enum MidpointRounding

Fields

TABLE 1
AwayFromZero 1

When a number is halfway between two others, it is rounded toward the nearest number that is away from zero.

ToEven 0

When a number is halfway between two others, it is rounded toward the nearest even number.

ToNegativeInfinity 3

When a number is halfway between two others, it is rounded toward the result closest to and no greater than the infinitely precise result.

ToPositiveInfinity 4

When a number is halfway between two others, it is rounded toward the result closest to and no less than the infinitely precise result.

ToZero 2

When a number is halfway between two others, it is rounded toward the result closest to and no greater in magnitude than the infinitely precise result.

posted @ 2020-04-30 11:15  向萧  阅读(297)  评论(0编辑  收藏  举报