roundingmode_string.go 894 B

123456789101112131415161718192021222324252627282930
  1. // Code generated by "stringer -type RoundingMode"; DO NOT EDIT.
  2. package number
  3. import "strconv"
  4. func _() {
  5. // An "invalid array index" compiler error signifies that the constant values have changed.
  6. // Re-run the stringer command to generate them again.
  7. var x [1]struct{}
  8. _ = x[ToNearestEven-0]
  9. _ = x[ToNearestZero-1]
  10. _ = x[ToNearestAway-2]
  11. _ = x[ToPositiveInf-3]
  12. _ = x[ToNegativeInf-4]
  13. _ = x[ToZero-5]
  14. _ = x[AwayFromZero-6]
  15. _ = x[numModes-7]
  16. }
  17. const _RoundingMode_name = "ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes"
  18. var _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91}
  19. func (i RoundingMode) String() string {
  20. if i >= RoundingMode(len(_RoundingMode_index)-1) {
  21. return "RoundingMode(" + strconv.FormatInt(int64(i), 10) + ")"
  22. }
  23. return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
  24. }