Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Jul 25, 2023
1 parent e2d6111 commit df5b461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textprocessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The function func(w::Real)->Real is used to remap the weight, expressed as weigh
We set `weight = powermean(1*fontsize, wordlength*fontsize) = ((fontsize^p + (wordlength*fontsize)^p)/2) ^ (1/p)`.
That is, `weight = fontsize * powermean(1, wordlength)`.
Overall, this gives us `fontsize = func(weight) / powermean(1, wordlength)`.
When p is -Inf, the power mean is at its minimum, resulting in fontsize=weight. When p is Inf, the power mean is at its maximum, resulting in fontsize=weight/wordlength.
When p is -Inf, the power mean is the minimum value, resulting in fontsize=weight. When p is Inf, the power mean is the maximum value, resulting in fontsize=weight/wordlength.
When p is -1, the power mean is the harmonic mean. When p is 0, the power mean is the geometric mean, preserving the word area.
When p is 1, the power mean is the arithmetic mean. When p is 2, the power mean is the root mean square, preserving the diagonal length.
"""
Expand Down

2 comments on commit df5b461

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/88353

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.1 -m "<description of version>" df5b461cbebf3c41f1ba4f5b12e87aea53583e8f
git push origin v0.12.1

Please sign in to comment.