summaryrefslogtreecommitdiff
path: root/modules/mono/glue/cs_files/Basis.cs
diff options
context:
space:
mode:
authorXavier Cho <mysticfallband@gmail.com>2018-04-08 12:30:43 +0900
committerXavier Cho <mysticfallband@gmail.com>2018-04-17 07:39:37 +0900
commitfdfc478c888db89c44c748f273ef7fe4466d5c89 (patch)
tree3e265992e68208285586b45bb937d0e61164350d /modules/mono/glue/cs_files/Basis.cs
parent0ef3e0577b4c3889d19e6f301e06fba39e8187d5 (diff)
#18051: Use 'var' when applicable
Diffstat (limited to 'modules/mono/glue/cs_files/Basis.cs')
-rw-r--r--modules/mono/glue/cs_files/Basis.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/mono/glue/cs_files/Basis.cs b/modules/mono/glue/cs_files/Basis.cs
index 660243f77f..d16e40488c 100644
--- a/modules/mono/glue/cs_files/Basis.cs
+++ b/modules/mono/glue/cs_files/Basis.cs
@@ -220,11 +220,11 @@ namespace Godot
public int GetOrthogonalIndex()
{
- Basis orth = this;
+ var orth = this;
- for (int i = 0; i < 3; i++)
+ for (var i = 0; i < 3; i++)
{
- for (int j = 0; j < 3; j++)
+ for (var j = 0; j < 3; j++)
{
real_t v = orth[i, j];
@@ -239,7 +239,7 @@ namespace Godot
}
}
- for (int i = 0; i < 24; i++)
+ for (var i = 0; i < 24; i++)
{
if (orthoBases[i] == orth)
return i;
@@ -250,9 +250,9 @@ namespace Godot
public Basis Inverse()
{
- Basis inv = this;
+ var inv = this;
- real_t[] co = new real_t[3]
+ var co = new real_t[3]
{
inv[1, 1] * inv[2, 2] - inv[1, 2] * inv[2, 1],
inv[1, 2] * inv[2, 0] - inv[1, 0] * inv[2, 2],
@@ -311,7 +311,7 @@ namespace Godot
public Basis Scaled(Vector3 scale)
{
- Basis m = this;
+ var m = this;
m[0, 0] *= scale.x;
m[0, 1] *= scale.x;
@@ -343,7 +343,7 @@ namespace Godot
public Basis Transposed()
{
- Basis tr = this;
+ var tr = this;
real_t temp = this[0, 1];
this[0, 1] = this[1, 0];
@@ -415,8 +415,8 @@ namespace Godot
(_x[2] - _z[0]) * inv_s
);
} else {
- real_t s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f;
- real_t inv_s = 1f / s;
+ var s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f;
+ var inv_s = 1f / s;
return new Quat(
(_x[2] + _z[0]) * inv_s,
(_y[2] + _z[1]) * inv_s,
@@ -450,7 +450,7 @@ namespace Godot
public Basis(Vector3 axis, real_t phi)
{
- Vector3 axis_sq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z);
+ var axis_sq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z);
real_t cosine = Mathf.Cos( phi);
real_t sine = Mathf.Sin( phi);