ec49a73c74
* Implement algo feed * Remove 'See more...' from feed items * Fix problem with useUpdatedContracts. * Tweak some params
7 lines
201 B
TypeScript
7 lines
201 B
TypeScript
export const logInterpolation = (min: number, max: number, value: number) => {
|
|
if (value <= min) return 0
|
|
if (value >= max) return 1
|
|
|
|
return Math.log(value - min + 1) / Math.log(max - min + 1)
|
|
}
|