Skip to content

Commit b0af7db

Browse files
committed
Fixed formatting of all code files replacing tabs with 4 spaces.
1 parent fe8c994 commit b0af7db

File tree

11 files changed

+846
-846
lines changed

11 files changed

+846
-846
lines changed

Src/UnitsNet/Flow.cs

Lines changed: 143 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -3,148 +3,148 @@
33

44
namespace UnitsNet
55
{
6-
/// <summary>
7-
/// A class for representing flow.
8-
/// </summary>
9-
public struct Flow : IComparable, IComparable<Flow>
10-
{
11-
private const double SecondToMinuteRatio = 60;
12-
private const double SecondToHourRatio = 3600;
13-
14-
public readonly double CubicMeterPerSecond;
15-
16-
private Flow(double cubicMeterPerSecond)
17-
: this()
18-
{
19-
CubicMeterPerSecond = cubicMeterPerSecond;
20-
}
21-
22-
public double CubicMeterPerHour
23-
{
24-
get { return CubicMeterPerSecond / SecondToHourRatio; }
25-
}
26-
27-
#region Static
28-
29-
public static Flow Zero
30-
{
31-
get { return new Flow(); }
32-
}
33-
34-
public static Flow FromCubicMeterPerHour(double cmh)
35-
{
36-
return new Flow(cmh * SecondToHourRatio);
37-
}
38-
39-
public static Flow FromCubicMeterPerSecond(double cms)
40-
{
41-
return new Flow(cms);
42-
}
43-
44-
#endregion
45-
46-
#region Equality / IComparable
47-
48-
public int CompareTo(object obj)
49-
{
50-
if (obj == null) throw new ArgumentNullException("obj");
51-
if (!(obj is Flow)) throw new ArgumentException("Expected type Flow.", "obj");
52-
return CompareTo((Flow)obj);
53-
}
54-
55-
public int CompareTo(Flow other)
56-
{
57-
return CubicMeterPerSecond.CompareTo(other.CubicMeterPerSecond);
58-
}
59-
60-
public static bool operator <=(Flow left, Flow right)
61-
{
62-
return left.CubicMeterPerSecond <= right.CubicMeterPerSecond;
63-
}
64-
65-
public static bool operator >=(Flow left, Flow right)
66-
{
67-
return left.CubicMeterPerSecond >= right.CubicMeterPerSecond;
68-
}
69-
70-
public static bool operator <(Flow left, Flow right)
71-
{
72-
return left.CubicMeterPerSecond < right.CubicMeterPerSecond;
73-
}
74-
75-
public static bool operator >(Flow left, Flow right)
76-
{
77-
return left.CubicMeterPerSecond > right.CubicMeterPerSecond;
78-
}
79-
80-
public static bool operator ==(Flow left, Flow right)
81-
{
82-
return left.CubicMeterPerSecond == right.CubicMeterPerSecond;
83-
}
84-
85-
public static bool operator !=(Flow left, Flow right)
86-
{
87-
return left.CubicMeterPerSecond != right.CubicMeterPerSecond;
88-
}
89-
90-
public override bool Equals(object obj)
91-
{
92-
if (obj == null || GetType() != obj.GetType())
93-
{
94-
return false;
95-
}
96-
97-
return CubicMeterPerSecond.Equals(((Flow)obj).CubicMeterPerSecond);
98-
}
99-
100-
public override int GetHashCode()
101-
{
102-
return CubicMeterPerSecond.GetHashCode();
103-
}
104-
#endregion
105-
106-
#region Arithmetic operators
107-
108-
public static Flow operator -(Flow right)
109-
{
110-
return new Flow(-right.CubicMeterPerSecond);
111-
}
112-
113-
public static Flow operator +(Flow left, Flow right)
114-
{
115-
return new Flow(left.CubicMeterPerSecond + right.CubicMeterPerSecond);
116-
}
117-
118-
public static Flow operator -(Flow left, Flow right)
119-
{
120-
return new Flow(left.CubicMeterPerSecond - right.CubicMeterPerSecond);
121-
}
122-
123-
public static Flow operator *(double left, Flow right)
124-
{
125-
return new Flow(left * right.CubicMeterPerSecond);
126-
}
127-
128-
public static Flow operator *(Flow left, double right)
129-
{
130-
return new Flow(left.CubicMeterPerSecond * right);
131-
}
132-
133-
public static Flow operator /(Flow left, double right)
134-
{
135-
return new Flow(left.CubicMeterPerSecond / right);
136-
}
137-
138-
public static double operator /(Flow left, Flow right)
139-
{
140-
return left.CubicMeterPerSecond / right.CubicMeterPerSecond;
141-
}
142-
143-
#endregion
144-
145-
public override string ToString()
146-
{
6+
/// <summary>
7+
/// A class for representing flow.
8+
/// </summary>
9+
public struct Flow : IComparable, IComparable<Flow>
10+
{
11+
private const double SecondToMinuteRatio = 60;
12+
private const double SecondToHourRatio = 3600;
13+
14+
public readonly double CubicMeterPerSecond;
15+
16+
private Flow(double cubicMeterPerSecond)
17+
: this()
18+
{
19+
CubicMeterPerSecond = cubicMeterPerSecond;
20+
}
21+
22+
public double CubicMeterPerHour
23+
{
24+
get { return CubicMeterPerSecond / SecondToHourRatio; }
25+
}
26+
27+
#region Static
28+
29+
public static Flow Zero
30+
{
31+
get { return new Flow(); }
32+
}
33+
34+
public static Flow FromCubicMeterPerHour(double cmh)
35+
{
36+
return new Flow(cmh * SecondToHourRatio);
37+
}
38+
39+
public static Flow FromCubicMeterPerSecond(double cms)
40+
{
41+
return new Flow(cms);
42+
}
43+
44+
#endregion
45+
46+
#region Equality / IComparable
47+
48+
public int CompareTo(object obj)
49+
{
50+
if (obj == null) throw new ArgumentNullException("obj");
51+
if (!(obj is Flow)) throw new ArgumentException("Expected type Flow.", "obj");
52+
return CompareTo((Flow)obj);
53+
}
54+
55+
public int CompareTo(Flow other)
56+
{
57+
return CubicMeterPerSecond.CompareTo(other.CubicMeterPerSecond);
58+
}
59+
60+
public static bool operator <=(Flow left, Flow right)
61+
{
62+
return left.CubicMeterPerSecond <= right.CubicMeterPerSecond;
63+
}
64+
65+
public static bool operator >=(Flow left, Flow right)
66+
{
67+
return left.CubicMeterPerSecond >= right.CubicMeterPerSecond;
68+
}
69+
70+
public static bool operator <(Flow left, Flow right)
71+
{
72+
return left.CubicMeterPerSecond < right.CubicMeterPerSecond;
73+
}
74+
75+
public static bool operator >(Flow left, Flow right)
76+
{
77+
return left.CubicMeterPerSecond > right.CubicMeterPerSecond;
78+
}
79+
80+
public static bool operator ==(Flow left, Flow right)
81+
{
82+
return left.CubicMeterPerSecond == right.CubicMeterPerSecond;
83+
}
84+
85+
public static bool operator !=(Flow left, Flow right)
86+
{
87+
return left.CubicMeterPerSecond != right.CubicMeterPerSecond;
88+
}
89+
90+
public override bool Equals(object obj)
91+
{
92+
if (obj == null || GetType() != obj.GetType())
93+
{
94+
return false;
95+
}
96+
97+
return CubicMeterPerSecond.Equals(((Flow)obj).CubicMeterPerSecond);
98+
}
99+
100+
public override int GetHashCode()
101+
{
102+
return CubicMeterPerSecond.GetHashCode();
103+
}
104+
#endregion
105+
106+
#region Arithmetic operators
107+
108+
public static Flow operator -(Flow right)
109+
{
110+
return new Flow(-right.CubicMeterPerSecond);
111+
}
112+
113+
public static Flow operator +(Flow left, Flow right)
114+
{
115+
return new Flow(left.CubicMeterPerSecond + right.CubicMeterPerSecond);
116+
}
117+
118+
public static Flow operator -(Flow left, Flow right)
119+
{
120+
return new Flow(left.CubicMeterPerSecond - right.CubicMeterPerSecond);
121+
}
122+
123+
public static Flow operator *(double left, Flow right)
124+
{
125+
return new Flow(left * right.CubicMeterPerSecond);
126+
}
127+
128+
public static Flow operator *(Flow left, double right)
129+
{
130+
return new Flow(left.CubicMeterPerSecond * right);
131+
}
132+
133+
public static Flow operator /(Flow left, double right)
134+
{
135+
return new Flow(left.CubicMeterPerSecond / right);
136+
}
137+
138+
public static double operator /(Flow left, Flow right)
139+
{
140+
return left.CubicMeterPerSecond / right.CubicMeterPerSecond;
141+
}
142+
143+
#endregion
144+
145+
public override string ToString()
146+
{
147147
return string.Format("≈{0:0.##} {1}", CubicMeterPerSecond, UnitSystem.Create().GetDefaultAbbreviation(Unit.CubicMeterPerSecond));
148-
}
149-
}
148+
}
149+
}
150150
}

Src/UnitsNet/Pressure.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace UnitsNet
2929
public struct Pressure : IComparable, IComparable<Pressure>
3030
{
3131
private const double KpaToPaRatio = 1000;
32-
private const double MpaToPaRatio = 1000000;
32+
private const double MpaToPaRatio = 1000000;
3333
private const double Nm2ToPaRatio = 1;
3434
private const double Ncm2ToPaRatio = 1E+4;
3535
private const double Nmm2ToPaRatio = 1E+6;
@@ -38,7 +38,7 @@ public struct Pressure : IComparable, IComparable<Pressure>
3838
private const double AtmToPaRatio = 101325;
3939
private const double TorrToPaRatio = 1.3332266752*1E2;
4040
private const double PsiToPaRatio = 6.89464975179*1E3;
41-
private const double KFSCToPaRatio = 98066.5;
41+
private const double KFSCToPaRatio = 98066.5;
4242

4343
/// <summary>
4444
/// Pressure in pascal.
@@ -57,15 +57,15 @@ public double KiloPascals
5757
get { return Pascals/KpaToPaRatio; }
5858
}
5959

60-
public double MegaPascals
61-
{
62-
get { return Pascals / MpaToPaRatio; }
63-
}
60+
public double MegaPascals
61+
{
62+
get { return Pascals / MpaToPaRatio; }
63+
}
6464

65-
public double KilogramForcePerSquareCentimeter
66-
{
67-
get { return Pascals / KFSCToPaRatio; }
68-
}
65+
public double KilogramForcePerSquareCentimeter
66+
{
67+
get { return Pascals / KFSCToPaRatio; }
68+
}
6969

7070
public double NewtonsPerSquareMeter
7171
{
@@ -142,15 +142,15 @@ public static Pressure FromKiloPascals(double kpa)
142142
return new Pressure(KpaToPaRatio*kpa);
143143
}
144144

145-
public static Pressure FromMegaPascals(double mpa)
146-
{
147-
return new Pressure(MpaToPaRatio * mpa);
148-
}
145+
public static Pressure FromMegaPascals(double mpa)
146+
{
147+
return new Pressure(MpaToPaRatio * mpa);
148+
}
149149

150-
public static Pressure FromKilogramForcePerSquareCentimeter(double kfsc)
151-
{
152-
return new Pressure(KFSCToPaRatio * kfsc);
153-
}
150+
public static Pressure FromKilogramForcePerSquareCentimeter(double kfsc)
151+
{
152+
return new Pressure(KFSCToPaRatio * kfsc);
153+
}
154154

155155
public static Pressure FromNewtonsPerSquareCentimeter(double nsc)
156156
{

0 commit comments

Comments
 (0)