瀏覽代碼

Update vec.py

blueloveTH 1 年之前
父節點
當前提交
a947f7249f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      benchmarks/vec.py

+ 3 - 0
benchmarks/vec.py

@@ -10,6 +10,9 @@ class vec2:
 
     def __eq__(self, other):
         return self.x == other.x and self.y == other.y
+    
+    def __ne__(self, other):
+        return not self == other
 
 x = vec2(0, 0)
 for i in range(10000000):