[cs] rename variables

update-fork
MITSUNARI Shigeo 4 years ago
parent 19aad60e2a
commit 1456a13f4c
  1. 37
      ffi/cs/mcl/mcl.cs

@ -312,10 +312,9 @@ namespace mcl {
private U128 v0, v1; private U128 v0, v1;
public static Fr One() public static Fr One()
{ {
var fr = new Fr(); var x = new Fr();
fr.SetInt(1); x.SetInt(1);
return x;
return fr;
} }
public static Fr Zero() => new Fr(); public static Fr Zero() => new Fr();
public void Clear() public void Clear()
@ -462,9 +461,9 @@ namespace mcl {
private U128 v0, v1, v2; private U128 v0, v1, v2;
public static Fp One() public static Fp One()
{ {
var fp = new Fp(); var x = new Fp();
fp.SetInt(1); x.SetInt(1);
return fp; return x;
} }
public static Fp Zero() => new Fp(); public static Fp Zero() => new Fp();
public void Clear() public void Clear()
@ -804,23 +803,23 @@ namespace mcl {
result.Neg(x); result.Neg(x);
return result; return result;
} }
public static G2 operator +(in G2 left, in G2 right) public static G2 operator +(in G2 x, in G2 y)
{ {
var result = new G2(); var z = new G2();
result.Add(left, right); z.Add(x, y);
return result; return z;
} }
public static G2 operator -(in G2 left, in G2 right) public static G2 operator -(in G2 x, in G2 y)
{ {
var result = new G2(); var z = new G2();
result.Sub(left, right); z.Sub(x, y);
return result; return z;
} }
public static G2 operator *(in G2 left, in Fr right) public static G2 operator *(in G2 x, in Fr y)
{ {
var result = new G2(); var z = new G2();
result.Mul(left, right); z.Mul(x, y);
return result; return z;
} }
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]

Loading…
Cancel
Save