/// <summary> /// Adds two points on the curve according to the addition rule specific /// for this <see cref="CurveEquation"/> instance. /// </summary> /// <param name="left">First point to add.</param> /// <param name="right">Second point to add.</param> /// <returns>Point on the curve that is the result of adding <paramref name="left"/> and <paramref name="right"/>.</returns> public abstract CurvePoint Add(CurvePoint left, CurvePoint right);
/// <summary> /// Tests whether a given point lies on the curve. /// </summary> /// <param name="point"><see cref="CurvePoint"/> to test.</param> /// <returns><c>true</c> if <paramref name="point"/> satisfies the curve equation; otherwise <c>false</c></returns> public abstract bool IsPointOnCurve(CurvePoint point);
/// <summary> /// Tests whether two given points on the curve are negations of each other. /// </summary> /// <param name="left">First point to check.</param> /// <param name="right">Second point to check.</param> /// <returns><c>true</c> if <paramref name="left"/> is a negation of <paramref name="right"/>; otherwise <c>false</c></returns> public bool AreNegations(CurvePoint left, CurvePoint right) { return(Negate(right).Equals(left)); }