static inline float criterion__define( float px_X, float px_Y, float py_X, float py_Y, float pz_X, float pz_Y, int q ) { float v_accel_X = abs_f(px_X + pz_X - 2.0*py_X); float v_accel_Y = abs_f(px_Y + pz_Y - 2.0*py_Y); int last_accel_X = (int)(v_accel_X + 0.5f); int last_accel_Y = (int)(v_accel_Y + 0.5f); float criterion = discrete_area( last_accel_X, last_accel_Y ); return criterion / IMAGE_AREA[q] ; }
static inline float criterion__define( float px_X, float px_Y, float py_X, float py_Y, float pz_X, float pz_Y, float f_h1_p1, float f_h2_p1, int q ) { float v_accel_X = abs_f((px_X-py_X)/f_h1_p1 + (pz_X-py_X)/f_h2_p1) ; float v_accel_Y = abs_f((px_Y-py_Y)/f_h1_p1 + (pz_Y-py_Y)/f_h2_p1) ; int last_accel_X = (int)(v_accel_X + 0.5f); int last_accel_Y = (int)(v_accel_Y + 0.5f); float criterion = discrete_area( last_accel_X, last_accel_Y ); return criterion / IMAGE_AREA[q] ; }
int main(void) { int a; float b; printf("mutlak degerini ogrenmek istediginiz tam sayiyi giriniz:\n"); scanf("%d",&a); printf("Mutlak deger %d 'dir.\n\n", abs_i(a)); printf("mutlak degerini ogranmak istediginiz ondalik sayiyi giriniz:\n"); scanf("%f",&b); printf("Mutlak deger %f 'dir.\n", abs_f(b)); getch(); return 0; }