Created
February 28, 2020 07:16
-
-
Save wanseob/24220c8b743aa1b9ca25129a012b0811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include "circomlib/circuits/if_else_then.circom"; | |
template PointComp() { | |
component if_else_then = IfElseThen(2); /// compare 2 values | |
signal input point1[2]; | |
signal input point2[2]; | |
signal output out; | |
/// return (point1 == point2 ? 1 : 0;) | |
if_else_then.obj1[0] <== point1[0]; | |
if_else_then.obj1[1] <== point1[1]; | |
if_else_then.obj2[0] <== point2[0]; | |
if_else_then.obj2[1] <== point2[1]; | |
if_else_then.if_v <== 1; | |
if_else_then.else_v <== 0; | |
if_else_then.out ==> out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment