Browse Source

Use XML comments in ColorAnimator

pull/8919/head
robloo 4 years ago
parent
commit
229756534f
  1. 12
      src/Avalonia.Base/Animation/Animators/ColorAnimator.cs

12
src/Avalonia.Base/Animation/Animators/ColorAnimator.cs

@ -14,16 +14,20 @@ namespace Avalonia.Animation.Animators
/// </summary> /// </summary>
public class ColorAnimator : Animator<Color> public class ColorAnimator : Animator<Color>
{ {
// Opto-electronic conversion function for the sRGB color space /// <summary>
// Takes a gamma-encoded sRGB value and converts it to a linear sRGB value /// Opto-electronic conversion function for the sRGB color space.
/// Takes a gamma-encoded sRGB value and converts it to a linear sRGB value.
/// </summary>
private static double OECF_sRGB(double linear) private static double OECF_sRGB(double linear)
{ {
// IEC 61966-2-1:1999 // IEC 61966-2-1:1999
return linear <= 0.0031308d ? linear * 12.92d : (double)(Math.Pow(linear, 1.0d / 2.4d) * 1.055d - 0.055d); return linear <= 0.0031308d ? linear * 12.92d : (double)(Math.Pow(linear, 1.0d / 2.4d) * 1.055d - 0.055d);
} }
// Electro-optical conversion function for the sRGB color space /// <summary>
// Takes a linear sRGB value and converts it to a gamma-encoded sRGB value /// Electro-optical conversion function for the sRGB color space.
/// Takes a linear sRGB value and converts it to a gamma-encoded sRGB value.
/// </summary>
private static double EOCF_sRGB(double srgb) private static double EOCF_sRGB(double srgb)
{ {
// IEC 61966-2-1:1999 // IEC 61966-2-1:1999

Loading…
Cancel
Save