开发者

How to calculate the curve of a linear floating point number in Javascript?

How do I calculate a curve of a linear floating point number (0 to 1) and get another floating point number as a result? What I want is up until the half (0..0.5), to be inversed logarithmic and high than that to be logarithmic like a curve according to the given linear val开发者_如何学Cue.


So, what you are looking for is a function to do:

double x, y;
y = 1.0 / log(x) {x = 0 .. 0.5}
    log(x)     {x = 0.5 .. 1}

??

or:

y = exp(x) {x = 0 .. 0.5}

??

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜