Improved code documentation

This commit is contained in:
2019-09-10 09:49:51 +09:00
parent e774dccb08
commit 27753f6f9e
11 changed files with 28 additions and 24 deletions

View File

@ -1,20 +1,22 @@
package arn
// DefaultRating is the default rating value.
const DefaultRating = 0.0
const (
// DefaultRating is the default rating value.
DefaultRating = 0.0
// AverageRating is the center rating in the system.
// Note that the mathematically correct center would be a little higher,
// but we don't care about these slight offsets.
const AverageRating = 5.0
// AverageRating is the center rating in the system.
// Note that the mathematically correct center would be a little higher,
// but we don't care about these slight offsets.
AverageRating = 5.0
// MaxRating is the maximum rating users can give.
const MaxRating = 10.0
// MaxRating is the maximum rating users can give.
MaxRating = 10.0
// RatingCountThreshold is the number of users threshold that, when passed, doesn't dampen the result.
const RatingCountThreshold = 4
// RatingCountThreshold is the number of users threshold that, when passed, doesn't dampen the result.
RatingCountThreshold = 4
)
// AnimeRating ...
// AnimeRating represents the rating information for an anime.
type AnimeRating struct {
AnimeListItemRating