move pins->map up in block list

This commit is contained in:
Peli de Halleux
2016-05-24 21:39:57 -07:00
parent d8c2d697b1
commit 1c8fa5eab6
3 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ namespace pins {
* @param toLow the lower bound of the value's target range
* @param toHigh the upper bound of the value's target range, eg: 4
*/
//% help=pins/map weight=3
//% help=pins/map weight=22
//% blockId=math_map block="map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh"
export function map(value: number, fromLow: number, fromHigh: number, toLow: number, toHigh: number): number {
return ((value - fromLow) * (toHigh - toLow)) / (fromHigh - fromLow) + toLow;