A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
10
Task/Map-range/AutoHotkey/map-range.ahk
Normal file
10
Task/Map-range/AutoHotkey/map-range.ahk
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
mapRange(a1, a2, b1, b2, s)
|
||||
{
|
||||
return b1 + (s-a1)*(b2-b1)/(a2-a1)
|
||||
}
|
||||
|
||||
out := "Mapping [0,10] to [-1,0] at intervals of 1:`n"
|
||||
|
||||
Loop 11
|
||||
out .= "f(" A_Index-1 ") = " mapRange(0,10,-1,0,A_Index-1) "`n"
|
||||
MsgBox % out
|
||||
Loading…
Add table
Add a link
Reference in a new issue