- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
#define SQR(x) ((x)*(x))
#define RANGE(x1, y1, x2, y2) (sqrt(SQR(x1-x2) + SQR(y1-y2)))
#define bestz z_b[b_iz]
#define bestv v_b[b_iv]
#define curz z_b[it]
#define curv v_b[i]
#define best_range (bestz.rast + RANGE(bestz.x, bestz.y, bestv.x, bestv.y) + bestv.rast)
#define current_range (curz.rast + RANGE(curz.x, curz.y, curv.x, curv.y) + curv.rast)
#define fci (l + ((r - l) / 3))
#define sci (r - ((r - l) / 3))
#define fc z_b[fci]
#define sc z_b[sci]
#define from v_b[i]
#define range_1 (from.rast + RANGE(from.x, from.y, fc.x, fc.y) + fc.rast)
#define range_2 (from.rast + RANGE(from.x, from.y, sc.x, sc.y) + sc.rast)
lorc 04.02.2015 16:04 # +1
И да, где тут C++, jyree?!