This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DBContext | |
{ | |
private LiteDatabase _userDB; | |
public static DBContext Instance { get; } = new DBContext(DefaultDatabaseFolderPath); | |
... | |
string userDataDBFilePath = Path.Combine(DatabaseFolderPath, "UserData.lite"); | |
_userDB = new LiteDatabase(GetConnectionString(userDataDBFilePath)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public static class MathExtensions | |
{ | |
/// <returns> true, if the values differ fewer than the tolerance. </returns> | |
public static bool EqualsNearly(this double a, double b, double tolerance) => Math.Abs(a - b) < tolerance; | |
} |