File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 19
19
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
20
// THE SOFTWARE.
21
21
22
+ #if ! WINDOWS_UWP
22
23
using System ;
23
24
using System . Collections . Generic ;
24
25
using UnitsNet . Units ;
26
+ #endif
25
27
26
28
namespace UnitsNet
27
29
{
28
30
/// <summary>
29
31
/// A class for representing position in two dimensions.
30
32
/// </summary>
33
+ #if WINDOWS_UWP
34
+ public struct Length2d
35
+ {
36
+ /// <summary>
37
+ /// Returns a point represented in meters.
38
+ /// </summary>
39
+ public Vector2 Meters ;
40
+ }
41
+ #else
31
42
public struct Length2d : IEquatable < Length2d >
32
43
{
33
44
/// <summary>
@@ -244,4 +255,5 @@ public int GetHashCode(Length2d obj)
244
255
245
256
#endregion
246
257
}
258
+ #endif
247
259
}
Original file line number Diff line number Diff line change 24
24
25
25
namespace UnitsNet
26
26
{
27
+ #if WINDOWS_UWP
28
+ public struct Vector2
29
+ {
30
+ public double X ;
31
+ public double Y ;
32
+ }
33
+ #else
27
34
public struct Vector2 : IEquatable < Vector2 >
28
35
{
29
36
public readonly double X ;
@@ -41,7 +48,7 @@ public Vector2(double xy) : this()
41
48
Y = xy ;
42
49
}
43
50
44
- #region Equality
51
+ #region Equality
45
52
46
53
private static IEqualityComparer < Vector2 > XyComparer { get ; } = new XyEqualityComparer ( ) ;
47
54
@@ -90,11 +97,12 @@ public int GetHashCode(Vector2 obj)
90
97
}
91
98
}
92
99
93
- #endregion
100
+ #endregion
94
101
95
102
public override string ToString ( )
96
103
{
97
104
return $ "[{ X : 0.####} , { Y : 0.####} ]";
98
105
}
99
106
}
107
+ #endif
100
108
}
Original file line number Diff line number Diff line change 24
24
25
25
namespace UnitsNet
26
26
{
27
+ #if WINDOWS_UWP
28
+ public struct Vector3
29
+ {
30
+ public double X ;
31
+ public double Y ;
32
+ public double Z ;
33
+ }
34
+ #else
27
35
public struct Vector3 : IEquatable < Vector3 >
28
36
{
29
37
public readonly double X ;
@@ -96,4 +104,5 @@ public override string ToString()
96
104
return $ "[{ X : 0.####} , { Y : 0.####} , { Z : 0.####} ]";
97
105
}
98
106
}
107
+ #endif
99
108
}
You can’t perform that action at this time.
0 commit comments