CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): Gunee (해오라비)
날 짜 (Date): 2002년 3월 27일 수요일 오후 02시 50분 13초
제 목(Title): Re: [Q] pow 함수의 사용법


    unsigned short i=0, j=0, k=0,x=0;
    byte clio[30],arms[32], ch, ch2, c[2],x;


        for (i=0;i<16;i+=2) // upper half of the character
        {
            for(j=0;j<8;j++)
            {
                arms[i] +=  (x = (clio[j] & (byte)pow((double)2,(double)(i/2)))) ? pow(2,j) : 0 ; // 1 byte = northwest
                printf("(i=%d,pow=%f x=%x arms=%x)",i,(byte)pow((double)2,(double)(i/2)),x,arms[i]);
            }
            printf("\n");
            for(j=8;j<15;j++)
                arms[i+1] +=  clio[j] & (byte)pow(2,i/2) ? pow(2,j-8) : 0 ; // 1 byte = northeast
        }

입니다.



                         Fear can hold you prisoner,
                      
                                 Hope will set you free !!!
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.