From 6603e2cb2052a7ac4fdede284db53bfcac5ae595 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Thu, 9 Aug 2001 01:32:38 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/showbase/PythonUtil.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index e3fb7fdbd6..c123b69412 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -323,6 +323,17 @@ def intersection(a, b): d.append(i) return d +def union(a, b): + """ + union(list, list): + """ + # Copy a + c = a[:] + for i in b: + if (i not in c): + c.append(i) + return c + def reduceAngle(deg): """ Reduces an angle (in degrees) to a value between -180. and 180.