equals method

bool equals(
  1. Point other
)

Equality check: compare points

Implementation

bool equals(Point other) {
  final (BigInt X1, BigInt Y1, BigInt Z1) = (px, py, pz);

  final (BigInt X2, BigInt Y2, BigInt Z2) = (other.px, other.py, other.pz);

  final BigInt X1Z2 = Utilities.mod(X1 * Z2);
  final BigInt X2Z1 = Utilities.mod(X2 * Z1);

  final BigInt Y1Z2 = Utilities.mod(Y1 * Z2);
  final BigInt Y2Z1 = Utilities.mod(Y2 * Z1);
  return X1Z2 == X2Z1 && Y1Z2 == Y2Z1;
}