From dbfb75f964e6e224086d2aa22dd9700b21d22fb4 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 4 Jun 2003 21:11:29 +0000 Subject: [PATCH] added boolEqual for new SpeedChat --- direct/src/showbase/PythonUtil.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index d907256873..76fef9b36a 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -530,6 +530,13 @@ def lerp(v0, v1, t): """ return v0 + (t * (v1 - v0)) +def boolEqual(a, b): + """ + returns true if a and b are both true or both false. + returns false otherwise + """ + return (a and b) or not (a or b) + def lineupPos(i, num, spacing): """ use to line up a series of 'num' objects, in one dimension,