How can you lerp for example 300 into a 0,1?

Make a big number be contained inside a range of 1?

To Lerp between 0 to +1 is :-
0 to 300 is the example variable.
Example:1/300×300 = 1
Example: 1/300×150 = 0.5

To lerp between -1 to +1 with a positive value at hand is :-
2/300×300-1 = 1
2/300×0-1 = -1

To lerp between -1 to +1 with a negative value is:-
2/300x(-300)+1 = -1
2/300×(-0)+1 = 1

Tags
Question

4 Comments

  • Log in to leave a comment
  • Profile image

    @SmurfResearchX hey are you still active?

    8 months ago
  • Profile image

    @SmurfResearchX yes this works wonderfully thanks alot.
    This is needed for gauges and such

    +1 2.2 years ago
  • Profile image

    (1/300) × variable value
    the maximum (300) should give the range from 0-1, and the output of the variable would be a fraction of that...if that is what you mean?

    +1 2.2 years ago
  • Profile image

    the number example is 300

    0.3

    2.2 years ago

No Upvotes

Log in in to upvote this post.