equals method
(en)Compare while considering the error. Returns true if x, y, z are all within the e_range.
(ja)誤差を考慮しつつ比較します。x,y,zの全てが誤差e_range以内の場合はtrueを返します。
other
: other vector.eRange
: The range of error to allow. This must be a positive number.
Implementation
bool equals(Sp3dV3D other, double eRange) {
return x - eRange <= other.x &&
other.x <= x + eRange &&
y - eRange <= other.y &&
other.y <= y + eRange &&
z - eRange <= other.z &&
other.z <= z + eRange;
}