Scale numbers to be <= 255?

前端 未结 13 2238
生来不讨喜
生来不讨喜 2021-02-05 18:39

I have cells for whom the numeric value can be anything between 0 and Integer.MAX_VALUE. I would like to color code these cells correspondingly.

If the val

13条回答
  •  一个人的身影
    2021-02-05 19:16

    Here are a bunch of algorithms for scaling, normalizing, ranking, etc. numbers by using Extension Methods in C#, although you can adapt them to other languages:

    http://www.redowlconsulting.com/Blog/post/2011/07/28/StatisticalTricksForLists.aspx

    There are explanations and graphics that explain when you might want to use one method or another.

提交回复
热议问题