예제 #1
0
파일: JS.c 프로젝트: Dreamcatcher-GIS/C-KXO
int FS()
{
	double fi,fj,fw;
	int cc;
	
	yscs.d=0.0;	cc=0;

	do{
		
		ZS();
		fi = sqrt((yscs.xn-yscs.x1)*(yscs.xn-yscs.x1)+(yscs.ye-yscs.y1)*(yscs.ye-yscs.y1));
 		fj = atan((yscs.ye-yscs.y1)/(yscs.xn-yscs.x1+1e-12));
		fj = fj/ PI * 180.0;
		if (yscs.xn -yscs.x1< 0.0)	fj += 180.0;
		if (fj<0.0)	fj += 360.0;
		fw=fi*sin((yscs.fn-fj-90.0)*PI/180.0);
		yscs.k=yscs.k+fw;
		++cc;
		if (cc>=80)	fw=0.00001;

	}while(fabs(fw)>0.0001);
		ZS();
		yscs.d=(yscs.y1-yscs.ye)/sin((yscs.fn+90.0)*PI/180.0);
		return 1;
}
예제 #2
0
#endif
{
   C4(A, B8G8R8A8_UNORM, BGRA8_UNORM, B, G, R, A, UNORM, A8B8G8R8, ID),
   F3(A, B8G8R8X8_UNORM, BGRX8_UNORM, B, G, R, xx, UNORM, A8B8G8R8, TD),
   C4(A, B8G8R8A8_SRGB, BGRA8_SRGB, B, G, R, A, UNORM, A8B8G8R8, TD),
   F3(A, B8G8R8X8_SRGB, BGRX8_SRGB, B, G, R, xx, UNORM, A8B8G8R8, TD),
   C4(A, R8G8B8A8_UNORM, RGBA8_UNORM, R, G, B, A, UNORM, A8B8G8R8, IB),
   F3(A, R8G8B8X8_UNORM, RGBX8_UNORM, R, G, B, xx, UNORM, A8B8G8R8, TB),
   C4(A, R8G8B8A8_SRGB, RGBA8_SRGB, R, G, B, A, UNORM, A8B8G8R8, TB),
   F3(A, R8G8B8X8_SRGB, RGBX8_SRGB, R, G, B, xx, UNORM, A8B8G8R8, TB),

   ZX(B, Z16_UNORM, Z16_UNORM, R, R, R, xx, UNORM, Z16, TZ),
   ZX(A, Z32_FLOAT, Z32_FLOAT, R, R, R, xx, FLOAT, ZF32, TZ),
   ZX(A, Z24X8_UNORM, Z24_X8_UNORM, R, R, R, xx, UNORM, X8Z24, TZ),
   SZ(A, X8Z24_UNORM, S8_Z24_UNORM, G, G, G, xx, UNORM, Z24S8, TZ),
   ZS(A, Z24_UNORM_S8_UINT, Z24_S8_UNORM, R, R, R, xx, UNORM, S8Z24, TZ),
   SZ(A, S8_UINT_Z24_UNORM, S8_Z24_UNORM, G, G, G, xx, UNORM, Z24S8, TZ),
   ZS(A, Z32_FLOAT_S8X24_UINT, Z32_S8_X24_FLOAT, R, R, R, xx, FLOAT, ZF32_X24S8, TZ),

   SX(A, S8_UINT, R, R8, T),
   SX(A, X24S8_UINT, G, S8Z24, T),
   SX(A, S8X24_UINT, R, Z24S8, T),
   SX(A, X32_S8X24_UINT, G, ZF32_X24S8, T),

   F3(A, B5G6R5_UNORM, B5G6R5_UNORM, B, G, R, xx, UNORM, B5G6R5, TD),
   C4(A, B5G5R5A1_UNORM, BGR5_A1_UNORM, B, G, R, A, UNORM, A1B5G5R5, TD),
   F3(A, B5G5R5X1_UNORM, BGR5_X1_UNORM, B, G, R, xx, UNORM, A1B5G5R5, TD),
   C4(A, B4G4R4A4_UNORM, NONE, B, G, R, A, UNORM, A4B4G4R4, T),
   F3(A, B4G4R4X4_UNORM, NONE, B, G, R, xx, UNORM, A4B4G4R4, T),
   F3(A, R9G9B9E5_FLOAT, NONE, R, G, B, xx, FLOAT, E5B9G9R9_SHAREDEXP, T),