- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
/*---------------------------------------------------------------------------------------------------------------*/
double XzMinSec(double XBOCT,unsigned int OKP){ /*Gr(Ch).dG(dC)->Gr(Ch)MS.dS*/
signed int min, xz=XBOCT; XBOCT-=xz;min=60*XBOCT; XBOCT=(XBOCT*60-min)*60;
if (XBOCT>=59.5) { unsigned char teg[32]; double n = pow (10,OKP) * (XBOCT-min);
signed int z=n; n-=z; if ( n>=0.5 || n<=-0.5 ) { signed int x, y=0; sprintf ( teg, "%d", z);
while ( teg[y] != '\0' ) y++; z=1; for ( x=0; x<OKP; x++ ) if ( teg[--y] != '9' ) z=0;
if(z==1) if (abs(min) == 59 ) if(min<0) XBOCT=-4100; else XBOCT=4100; else if(min<0)
XBOCT = -100; else XBOCT = 100; } } return xz * 10000 + min * 100 + XBOCT; }
/*----------------------------------------------------------------------------------------------------------------*/
гм... работает...
Комментарии (0) RSS
Добавить комментарий