Normalizing from [0.5 - 1] to [0 - 1]

前端 未结 6 1575
自闭症患者
自闭症患者 2021-01-30 02:45

I\'m kind of stuck here, I guess it\'s a bit of a brain teaser. If I have numbers in the range between 0.5 to 1 how can I normalize it to be between 0 to 1?

Thanks for a

6条回答
  •  盖世英雄少女心
    2021-01-30 03:12

    You could always use clamp or saturate within your math to make sure your final value is between 0-1. Some saturate at the end, but I've seen it done during a computation, too.

提交回复
热议问题