Skip to content

Commit 0ad0f74

Browse files
committed
Reviewed conversion methods
1 parent d4327f2 commit 0ad0f74

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Runtime/Axis.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public Axis(InputAction action)
115115
/// <summary>
116116
/// An <see cref="Axis"/> can implicitly be converted to its <see cref="float"/> value.
117117
/// </summary>
118-
public static implicit operator float(Axis axis) => axis.Value;
118+
public static implicit operator float(Axis axis)
119+
=> axis.Value;
119120

120121
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
121122
#endregion

Runtime/Button.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public Button(InputAction action)
9494
/// <summary>
9595
/// A <see cref="Button"/> can implicitly be converted to its <see cref="bool"/> value.
9696
/// </summary>
97-
public static implicit operator bool(Button button) => button.Value;
97+
public static implicit operator bool(Button button)
98+
=> button.Value;
9899

99100
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
100101
#endregion

Runtime/TwinAxes.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ private void SetInputAction(InputAction action)
228228
/// </summary>
229229
public class Axis : InputProcessing.Axis
230230
{
231+
/// <summary>
232+
/// An <see cref="Axis"/> can implicitly be converted to its <see cref="float"/> value.
233+
/// </summary>
234+
public static implicit operator float(Axis axis)
235+
=> axis.Value;
236+
231237
/// <summary>
232238
/// Creates a new <see cref="Axis"/>. Used by a <see cref="TwinAxes"/> to create the <see cref="Axis"/>.
233239
/// </summary>

0 commit comments

Comments
 (0)