mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
same elements
This commit is contained in:
parent
24959a514a
commit
a454feae22
@ -333,6 +333,17 @@ def union(a, b):
|
||||
c.append(i)
|
||||
return c
|
||||
|
||||
def sameElements(a, b):
|
||||
if len(a) != len(b):
|
||||
return 0
|
||||
for elem in a:
|
||||
if elem not in b:
|
||||
return 0
|
||||
for elem in b:
|
||||
if elem not in a:
|
||||
return 0
|
||||
return 1
|
||||
|
||||
def reduceAngle(deg):
|
||||
"""
|
||||
Reduces an angle (in degrees) to a value between -180. and 180.
|
||||
|
Loading…
x
Reference in New Issue
Block a user