Added naqsh function representing the map function#14
Added naqsh function representing the map function#14mzaidikhlas wants to merge 1 commit intoasadm:masterfrom
Conversation
|
can you provide little elaboration over this ? or some thing equivalent in JS, may be I am missing something here. |
|
This is great stuff. I know |
|
Yes @asadm i agree, its a bit complicated since its a math driven function but I couldn't think of a simpler interpretation. Nevertheless, suggestions from the community would be highly appreciated so that we can change it to a simpler one. |
|
This would begin to change urduscript from a javascript dialect to a javascript library; is that consistent with the goals? |
|
I think primitive helper functions align with the goal fine. The goal is to make programming easier for Urdu speakers. Even if we go beyond what JS offers. I would imagine inheriting some AJAX helpers too. |
|
So have we decided a name for the function? |
I have added the naqsh function which maps a number from one range to another
naqsh(value, currentMinRange, currentMaxRange, targetMinRange, targetMaxRange)Example: