Changeset 2d517f2 in tol
- Timestamp:
- Nov 26, 2009, 9:01:02 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 047c98d
- Parents:
- 389cf33
- File:
-
- 1 edited
-
tol/btol/set_type/setgra.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/set_type/setgra.cpp
r389cf33 r2d517f2 780 780 return; 781 781 } 782 double from = fromDat.Value();782 double from = fromDat.Value(); 783 783 double until = untilDat.Value(); 784 double step = stepDat.Value();784 double step = stepDat.Value(); 785 785 int k; 786 786 double x; 787 if (step == 0.0) { /* warning!!! : this is a bad comparison */787 if(step == 0.0) { /* warning!!! : this is a bad comparison */ 788 788 Warning(I2("Argument 'p' of function Range cannot be zero", 789 789 "El argumento 'p' de la función Range no puede ser cero.")); 790 790 return; 791 791 } 792 for(k=0;;k++) 792 if(((step>0.0)&&(until<from))|| 793 ((step<0.0)&&(until>from))) { return; } 794 int K = 1+(int)floor(1.0+fabs((from-until)/step)-1.0); 795 for(k=0; k<K; k++) 793 796 { 794 x = from + step*k; 795 if((step>0)?(x>until):(x<until)) { break; } 797 x = 1.0 + (from + step*k) -1.0; 796 798 LstFastAppend(result, aux, new BContensDat("",x)); 797 799 }
Note: See TracChangeset
for help on using the changeset viewer.
