little math puzzle. Map 1 0 -1 to 1 0.5 0
|
05-21-2018, 10:24 AM
(This post was last modified: 05-21-2018 10:25 AM by pier4r.)
Post: #1
|
|||
|
|||
little math puzzle. Map 1 0 -1 to 1 0.5 0
Similar to "which kind of programmer are you": http://holyjoe.net/hp/flash07.txt
(there the e^x solution was quite neat) One get in input a value that can be 1 or 0 or -1 . The objective is to map those input to: 1 -> 1 0 -> 0.5 -1 -> 0 Of course, the first approach is a "switch case" block. Other ideas? (note that the first range is scaled to the second, but one ending point stays the same) Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)