Browse Source
Merge pull request #736 from j0rn/FixToStringCulture
Write float values using the invariant culture.
pull/740/head
Scott Williams
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with
15 additions and
15 deletions
-
src/ImageSharp/ColorSpaces/CieLab.cs
-
src/ImageSharp/ColorSpaces/CieLch.cs
-
src/ImageSharp/ColorSpaces/CieLchuv.cs
-
src/ImageSharp/ColorSpaces/CieLuv.cs
-
src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs
-
src/ImageSharp/ColorSpaces/CieXyy.cs
-
src/ImageSharp/ColorSpaces/CieXyz.cs
-
src/ImageSharp/ColorSpaces/Cmyk.cs
-
src/ImageSharp/ColorSpaces/Hsl.cs
-
src/ImageSharp/ColorSpaces/Hsv.cs
-
src/ImageSharp/ColorSpaces/HunterLab.cs
-
src/ImageSharp/ColorSpaces/LinearRgb.cs
-
src/ImageSharp/ColorSpaces/Lms.cs
-
src/ImageSharp/ColorSpaces/Rgb.cs
-
src/ImageSharp/ColorSpaces/YCbCr.cs
|
|
|
@ -127,7 +127,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieLab other && this.Equals(other); |
|
|
|
|
|
|
|
@ -129,7 +129,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieLch({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieLch({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
[MethodImpl(InliningOptions.ShortMethod)] |
|
|
|
|
|
|
|
@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieLchuv other && this.Equals(other); |
|
|
|
|
|
|
|
@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieLuv other && this.Equals(other); |
|
|
|
|
|
|
|
@ -67,7 +67,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
public override int GetHashCode() => HashHelpers.Combine(this.X.GetHashCode(), this.Y.GetHashCode()); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieXyChromaticityCoordinates other && this.Equals(other); |
|
|
|
|
|
|
|
@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieXyy other && this.Equals(other); |
|
|
|
|
|
|
|
@ -94,7 +94,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is CieXyz other && this.Equals(other); |
|
|
|
|
|
|
|
@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is Cmyk other && this.Equals(other); |
|
|
|
|
|
|
|
@ -92,7 +92,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"Hsl({this.H:#0.##}, {this.S:#0.##}, {this.L:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"Hsl({this.H:#0.##}, {this.S:#0.##}, {this.L:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is Hsl other && this.Equals(other); |
|
|
|
|
|
|
|
@ -90,7 +90,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"Hsv({this.H:#0.##}, {this.S:#0.##}, {this.V:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"Hsv({this.H:#0.##}, {this.S:#0.##}, {this.V:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is Hsv other && this.Equals(other); |
|
|
|
|
|
|
|
@ -126,7 +126,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"HunterLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"HunterLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is HunterLab other && this.Equals(other); |
|
|
|
|
|
|
|
@ -134,7 +134,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"LinearRgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"LinearRgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is LinearRgb other && this.Equals(other); |
|
|
|
|
|
|
|
@ -95,7 +95,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"Lms({this.L:#0.##}, {this.M:#0.##}, {this.S:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"Lms({this.L:#0.##}, {this.M:#0.##}, {this.S:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is Lms other && this.Equals(other); |
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"Rgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"Rgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is Rgb other && this.Equals(other); |
|
|
|
|
|
|
|
@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.ColorSpaces |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() => $"YCbCr({this.Y}, {this.Cb}, {this.Cr})"; |
|
|
|
public override string ToString() => FormattableString.Invariant($"YCbCr({this.Y}, {this.Cb}, {this.Cr})"); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) => obj is YCbCr other && this.Equals(other); |
|
|
|
|