Skip to content

Commit

Permalink
rewrite for clarity #157
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed May 21, 2024
1 parent dae254e commit 1b452ed
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ namespace nil {
* @return true if element from group G1 is the point at infinity
*/
constexpr bool is_zero() const {
return X == params_type::zero_fill[0] && Y == params_type::zero_fill[1];
/* Special case for blueprint compatibility: (0,0) is also infinity */
return (X == params_type::zero_fill[0] && Y == params_type::zero_fill[1])
|| (X.is_zero() && Y.is_zero() );
}

/** @brief
Expand Down

0 comments on commit 1b452ed

Please sign in to comment.