;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
(in-package :gacela)
(defconstant INFINITY MOST-POSITIVE-LONG-FLOAT)
(t (power (* p 2) n)))))
(power 1 n)))
-(defmacro mapcconst (type c-type name)
- (let ((c-header (concatenate 'string c-type " gacela_" name " (void)"))
- (c-body (concatenate 'string "return " name ";"))
- (c-name (concatenate 'string "gacela_" name))
- (lisp-name (intern (string-upcase name))))
- `(progn
- (defcfun ,c-header 0 ,c-body)
- (defentry ,lisp-name () (,type ,c-name))
- (eval-when (load) (defconstant ,lisp-name (,lisp-name))))))
-
;Geometry
(defun dotp (dot)
(match-pattern dot '(0 0)))