How can I generate a vector for input point. Like if i have a point (5,10) I would like to get output of (0.5, 0.75). And if I have (10,5) i wont get (0.75, 0.5) but I get (0.4, 0.25). And I want to get the same vector for the same point always. And ability to use seed value would be also good.
I thought about generating the value for x and y separately but I ran into 2 issue:
1) I haven't found a random number generator that accepts input value
2) Swapping x and y in input would just swap x and y in output. And fot he same x I get always the same value.
Is there a way to generate vectors this way so for every point there would be a unique vector?
Aucun commentaire:
Enregistrer un commentaire