Is there something like this in FUZE?
-
If you're familiar with the map() function in Processing it allows you to map a number to a different range of numbers.
https://processing.org/reference/map_.html"In the first example above, the number 25 is converted from a value in the range of 0 to 100 into a value that ranges from the left edge of the window (0) to the right edge (width).
As shown in the second example, numbers outside of the range are not clamped to the minimum and maximum parameters values, because out-of-range values are often intentional and useful"
If there isn't something like this in Fuze can somebody maybe help me out with alternative way of getting this task completed? I greatly appreciate any and all help. 🙏🏻🙏🏻🙏🏻
-
It might be useful for some context on what you are doing.
It sounds / feels like something I would want if i was trying to draw to a smaller coordinate system than the physical screen. If that is indeed what you are trying to do then please say because there's a very easy way of doing that in Fuze but I maybe completely off the mark here.
-
@QIsLegit I am not taking credit for this as I just found the implementation
value = 25 result = map(value, 0, 100, 0, 200) print(result, "\n") value = 100 result = map(value, 0, 100, -20, -10) update() sleep(3) function map(value, start1, stop1, start2, stop2) result = start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)) return result
-
@Martin
I'm actually not needing it for any specific project yet...but I have been thinking about ways that I could accomplish tasks on a future project I have planned. Simply a result of daydreaming :P Plus I still have much to learn.When I eventually end up needing to solve this problem I will update this post with my solution/result/process 🙏🏻
-
@pianofire
Thank you! 🙏🏻 I will update my post here when I get around to implementing this into a future project. Still working my way through the tutorials :P and I'm terrible at math. Much to learn!