As part of a PHP project, I have the need of returning the sine value of each value included in an arbitrary interval. Moreover, I also need to be able to set the "scope" of the function, that is, how many decimal places I need to cycle.
Eg: 1 decimal place for interval 1 to 3 included: 1, 1.1, 1.2, ... 2.8, 2.9, 3
2 decimal places for the same interval
1, 1.01, 1.02 ... 2.98, 2.99, 3
Etc... I tried doing it with the "for" cycle, but it would only consider natural numbers.
Suggestions?