Re: [Gambas-user] function to "wrap" a number between upper and lower bounds

2012-12-13 Thread Tobias Boege
On Wed, 12 Dec 2012, Kevin Fishburne wrote: > On 12/12/2012 05:33 PM, Kevin Fishburne wrote: > > I need a function like: > > > > Wrap(number, lowerbound, upperbound) > > > > such that Wrap(5,1, 3) will return 2. In other words, it "wraps" the > > number around the supplied bounds and returns where

Re: [Gambas-user] function to "wrap" a number between upper and lower bounds

2012-12-12 Thread Kevin Fishburne
On 12/12/2012 05:33 PM, Kevin Fishburne wrote: > I need a function like: > > Wrap(number, lowerbound, upperbound) > > such that Wrap(5,1, 3) will return 2. In other words, it "wraps" the > number around the supplied bounds and returns where it "lands". I > believe it would work similarly to assigni

Re: [Gambas-user] function to "wrap" a number between upper and lower bounds

2012-12-12 Thread Benoît Minisini
Le 12/12/2012 23:33, Kevin Fishburne a écrit : > I need a function like: > > Wrap(number, lowerbound, upperbound) > > such that Wrap(5,1, 3) will return 2. In other words, it "wraps" the > number around the supplied bounds and returns where it "lands". I > believe it would work similarly to assigni

[Gambas-user] function to "wrap" a number between upper and lower bounds

2012-12-12 Thread Kevin Fishburne
I need a function like: Wrap(number, lowerbound, upperbound) such that Wrap(5,1, 3) will return 2. In other words, it "wraps" the number around the supplied bounds and returns where it "lands". I believe it would work similarly to assigning a value to a datatype outside its scope, like assigni