Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added naqsh function representing the map function #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzaidikhlas
Copy link

I have added the naqsh function which maps a number from one range to another
naqsh(value, currentMinRange, currentMaxRange, targetMinRange, targetMaxRange)

Example:

rakho x = naqsh(5,1,10,1,100)
likho(x) // outputs 45

@monis01
Copy link

monis01 commented Jul 30, 2017

can you provide little elaboration over this ? or some thing equivalent in JS, may be I am missing something here.
Thanks

@asadm
Copy link
Owner

asadm commented Jul 30, 2017

This is great stuff. I know naksh translates perfectly but do we have a more simpler word we can use? Not necessarily a translation but conveys the meaning.

@mzaidikhlas
Copy link
Author

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.

@majidmade
Copy link
Contributor

This would begin to change urduscript from a javascript dialect to a javascript library; is that consistent with the goals?

@asadm
Copy link
Owner

asadm commented Jul 31, 2017

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.

@mzaidikhlas
Copy link
Author

So have we decided a name for the function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants