summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-03-13 00:36:31 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-03-13 00:36:31 +0100
commit58f866493fe786b1e583f7dddf8219ea4f0d5824 (patch)
tree09f8c4c0d04430753b4bb58ff0703e23733f21d4
parenta7e5de3489d2934332ff0dccc6d7a8d403eac216 (diff)
add comment on interval
-rw-r--r--roman.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/roman.go b/roman.go
index 7a7c4b3..f57e655 100644
--- a/roman.go
+++ b/roman.go
@@ -21,11 +21,11 @@ var (
m6 = []string{"", "M̅", "M̅M̅", "M̅M̅M̅"}
)
-// Roman represents a roman numeral
+// Roman represents a roman numeral in interval 0 < x < 4e6
type Roman int
func (n Roman) String() string {
- if n < 1 || n >= 4e6 {
+ if n <= 0 || n >= 4e6 {
return ""
}
// this is efficient in Go. the seven operands are evaluated,