Commit 38acd6ba authored by Liam Healy's avatar Liam Healy

Check zero dimension in make-pq-object

parent f9265eee
;; Physical dimension quantity with a magnitude that is a scalar
;; Liam Healy 2011-01-01 12:05:37EST grid.lisp
;; Time-stamp: <2013-03-23 18:55:13EDT scalar.lisp>
;; Time-stamp: <2015-04-24 17:01:41EDT scalar.lisp>
;; Copyright 2011, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -70,7 +70,8 @@
t))) ; only check vectors for non-scalar units
(dimel)
"~a is not a dimel" dimel)
(if (equal dimel (dimension 'dimensionless))
(if (or (and *zero-is-dimensionless* (zerop mag))
(equal dimel (dimension 'dimensionless)))
mag
(make-instance
'physical-quantity
......
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