| ... | @@ -120,12 +120,12 @@ pub const Scalar = struct { | ... | @@ -120,12 +120,12 @@ pub const Scalar = struct { |
| 120 | | 120 | |
| 121 | /// Compute x+y (mod L) | 121 | /// Compute x+y (mod L) |
| 122 | pub fn add(x: Scalar, y: Scalar) Scalar { | 122 | pub fn add(x: Scalar, y: Scalar) Scalar { |
| 123 | return Scalar{ .fe = x.fe().add(y.fe) }; | 123 | return Scalar{ .fe = x.fe.add(y.fe) }; |
| 124 | } | 124 | } |
| 125 | | 125 | |
| 126 | /// Compute x-y (mod L) | 126 | /// Compute x-y (mod L) |
| 127 | pub fn sub(x: Scalar, y: Scalar) Scalar { | 127 | pub fn sub(x: Scalar, y: Scalar) Scalar { |
| 128 | return Scalar{ .fe = x.fe().sub(y.fe) }; | 128 | return Scalar{ .fe = x.fe.sub(y.fe) }; |
| 129 | } | 129 | } |
| 130 | | 130 | |
| 131 | /// Compute 2n (mod L) | 131 | /// Compute 2n (mod L) |
| ... | @@ -135,7 +135,7 @@ pub const Scalar = struct { | ... | @@ -135,7 +135,7 @@ pub const Scalar = struct { |
| 135 | | 135 | |
| 136 | /// Compute x*y (mod L) | 136 | /// Compute x*y (mod L) |
| 137 | pub fn mul(x: Scalar, y: Scalar) Scalar { | 137 | pub fn mul(x: Scalar, y: Scalar) Scalar { |
| 138 | return Scalar{ .fe = x.fe().mul(y.fe) }; | 138 | return Scalar{ .fe = x.fe.mul(y.fe) }; |
| 139 | } | 139 | } |
| 140 | | 140 | |
| 141 | /// Compute x^2 (mod L) | 141 | /// Compute x^2 (mod L) |