mirror of https://github.com/SixLabors/ImageSharp
committed by
GitHub
15 changed files with 75 additions and 96 deletions
@ -0,0 +1,18 @@ |
|||||
|
// <copyright file="Constants.cs" company="James Jackson-South">
|
||||
|
// Copyright (c) James Jackson-South and contributors.
|
||||
|
// Licensed under the Apache License, Version 2.0.
|
||||
|
// </copyright>
|
||||
|
|
||||
|
namespace ImageSharp |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Common constants used throughout the project
|
||||
|
/// </summary>
|
||||
|
internal static class Constants |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// The epsilon for comparing floating point numbers.
|
||||
|
/// </summary>
|
||||
|
public static readonly float Epsilon = 0.001f; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
// <copyright file="ConstantsTests.cs" company="James Jackson-South">
|
||||
|
// Copyright (c) James Jackson-South and contributors.
|
||||
|
// Licensed under the Apache License, Version 2.0.
|
||||
|
// </copyright>
|
||||
|
|
||||
|
namespace ImageSharp.Tests.Common |
||||
|
{ |
||||
|
using Xunit; |
||||
|
|
||||
|
public class ConstantsTests |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void Epsilon() |
||||
|
{ |
||||
|
Assert.Equal(Constants.Epsilon, 0.001f); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue