Commit 7b201a30 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Efficiency improvement zerop, plusp, minusp

In zerop, plusp, minusp, call pq-magnitude instead of pqval; this is
more efficient.
parent 63fa8e0a
;; Arithmetic with physical dimension quantities.
;; Liam Healy Fri Apr 22 2005 - 09:58
;; Time-stamp: <2013-03-21 22:26:26EDT arithmetic.lisp>
;; Time-stamp: <2015-09-07 09:39:33EDT arithmetic.lisp>
;; Copyright 2011 Liam M. Healy
;; Copyright 2011, 2013, 2015 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;; This program is free software: you can redistribute it and/or modify
......@@ -216,15 +216,15 @@
(scalar-dimension x)))
(defmethod zerop ((x physical-quantity))
(antik:zerop (pqval x)))
(zerop (pq-magnitude x)))
(defmethod minusp ((x physical-quantity))
(antik:minusp (pqval x)))
(minusp (pq-magnitude x)))
(defmethod plusp ((x physical-quantity))
(antik:plusp (pqval x)))
(plusp (pq-magnitude x)))
(defmethod floor ((x physical-quantity) &optional (y 1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment