cryptofun/ecc/coord.go
ecc/coord.goRaw
1package ecc
2
3import "math/big"
4
5var (
6 bigZero = big.NewInt(int64(0))
7 zeroPoint = Point{bigZero, bigZero}
8)
9
10type Point struct {
11 X *big.Int
12 Y *big.Int
13}
14
15func (c1 *Point) Equal(c2 Point) bool {
16 if c1.X.Int64() != c2.X.Int64() {
17 return false
18 }
19 if c1.Y.Int64() != c2.Y.Int64() {
20 return false
21 }
22 return true
23}