Skip to content

Commit

Permalink
Add missing comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
robshakir committed Jul 10, 2024
1 parent fa7d72d commit 5eaea8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/yang/types_builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ func FromFloat(f float64) Number {
}
}

// Per RFC7950/6020, fraction-digits must be at least 1.
fracDig := uint8(1)
f *= 10.0
for ; Frac(f) != 0.0 && fracDig <= MaxFractionDigits; fracDig++ {
Expand Down

0 comments on commit 5eaea8e

Please sign in to comment.