Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Map-range/FreeBASIC/map-range.basic
Normal file
8
Task/Map-range/FreeBASIC/map-range.basic
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Function MapRange(s As Integer, a1 As Integer, a2 As Integer, b1 As Integer, b2 As Integer) As Double
|
||||
Return b1+(s-a1)*(b2-b1)/(a2-a1)
|
||||
End Function
|
||||
|
||||
For i As Integer = 0 To 10
|
||||
Print Using "## maps to ##.#"; i; MapRange(i,0,10,-1,0)
|
||||
Next i
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue