d2::combine::get_image_dynamic(): Use lrintf() instead of floor() and ceil().
[Ale.git] / ale_pos.h
blob0830526c00c5ad59a7febb5a67f680ccebeb8a40
1 // Copyright 2002, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __ale_pos_h__
22 #define __ale_pos_h__
24 #define SINGLE 1
25 #define DOUBLE 2
28 * Real-valued type used to represent coordinates in an image domain.
31 #if ALE_COORDINATES == SINGLE
33 typedef float ale_pos;
35 #define ALE_POS_PRECISION_STRING "SINGLE"
37 #elif ALE_COORDINATES == DOUBLE
39 typedef double ale_pos;
41 #define ALE_POS_PRECISION_STRING "DOUBLE"
43 #else
45 #warning Unknown positional precision in ale_pos.h: Choosing PPRECISION=SINGLE.
47 typedef float ale_pos;
49 #define ALE_POS_PRECISION_STRING "SINGLE"
51 #endif
53 #undef SINGLE
54 #undef DOUBLE
55 #undef HALF
57 #endif