• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

luttje / Key2Joy / 6602636543

22 Oct 2023 08:16AM UTC coverage: 44.104% (-8.4%) from 52.519%
6602636543

Pull #50

github

web-flow
Merge cf342a7b3 into 14b7ce9a7
Pull Request #50: Add XInput in preparation for gamepad triggers + add xmldoc

764 of 2383 branches covered (0.0%)

Branch coverage included in aggregate %.

3060 of 3060 new or added lines in 106 files covered. (100.0%)

3896 of 8183 relevant lines covered (47.61%)

15812.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

12.5
/Core/Key2Joy.Core/Mapping/ExactAxisDirection.cs
1
using System;
2

3
namespace Key2Joy.Mapping;
4

5
/// <summary>
6
/// More detailed specification of direction than <see cref="AxisDirection" />.
7
/// </summary>
8
public struct ExactAxisDirection : IEquatable<ExactAxisDirection>
9
{
10
    /// <summary>
11
    /// A fraction from -1 to 1, where -1 is left and 1 is right.
12
    /// </summary>
13
    public float X { get; set; }
8✔
14

15
    /// <summary>
16
    /// A fraction from -1 to 1, where -1 is up and 1 is down.
17
    /// </summary>
18
    public float Y { get; set; }
8✔
19

20
    /// <summary>
21
    /// Creates a new instance of <see cref="ExactAxisDirection"/>.
22
    /// </summary>
23
    /// <param name="x"></param>
24
    /// <param name="y"></param>
25
    public ExactAxisDirection(float x, float y)
26
    {
27
        this.X = x;
×
28
        this.Y = y;
×
29
    }
×
30

31
    /// <inheritdoc/>
32
    public override bool Equals(object obj)
33
        => obj is ExactAxisDirection direction && this.Equals(direction);
×
34

35
    /// <inheritdoc/>
36
    public readonly bool Equals(ExactAxisDirection other)
37
        => this.X == other.X && this.Y == other.Y;
×
38

39
    /// <inheritdoc/>
40
    public override readonly int GetHashCode()
41
    {
42
        var hashCode = 1861411795;
×
43
        hashCode = hashCode * -1521134295 + this.X.GetHashCode();
×
44
        hashCode = hashCode * -1521134295 + this.Y.GetHashCode();
×
45
        return hashCode;
×
46
    }
47

48
    /// <inheritdoc/>
49
    public override readonly string ToString()
50
        => $"({this.X}, {this.Y})";
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc