float_round_style

열거형에는 부동 소수점 값을 정수 값으로 반올림 구현을 선택할 수는 다양 한 방법을 설명 합니다.

enum float_round_style {
   round_indeterminate = -1,
   round_toward_zero = 0,
   round_to_nearest = 1,
   round_toward_infinity = 2,
   round_toward_neg_infinity = 3
   };

반환 값

열거형을 반환합니다.

  • round_indeterminate 반올림 메서드가 확인할 수 없는 경우.

  • round_toward_zero 경우는 0으로 반올림 합니다.

  • round_to_nearest 경우 라운드에 가장 가까운 정수입니다.

  • round_toward_infinity 경우 라운드에서 0.

  • round_toward_neg_infinity 경우 보다 음의 정수를 라운드 합니다.

예제

참조 numeric_limits::round_style 예제에서는이 열거형의 값 수 액세스할 수 있습니다.

요구 사항

헤더: <limits>

네임 스페이스: std