Various tweaks

This commit is contained in:
2019-02-26 18:43:42 -06:00
parent 8ccd1506f3
commit 2e69647ae3
9 changed files with 85 additions and 46 deletions

View File

@@ -22,10 +22,17 @@ class IMICFPS
# def xyzw=(nx, ny, nz, nw); @x = nx; @y = ny; @z = nz; @weight = nw; end
def ==(other)
@x == other.x &&
@y == other.y &&
@z == other.z &&
@weight == other.weight
if other.is_a?(Numeric)
@x == other &&
@y == other &&
@z == other &&
@weight == other
else
@x == other.x &&
@y == other.y &&
@z == other.z &&
@weight == other.weight
end
end
def +(other)