Remove CannyFastMath.

This commit is contained in:
Pieter-Jan Briers
2020-08-12 21:09:56 +02:00
parent 3ca3b5e684
commit f182ff5613
15 changed files with 64 additions and 81 deletions

View File

@@ -141,7 +141,7 @@ namespace Content.Client.GameObjects.Components.Weapons
const float xOffset = 0.0f;
// Overkill but easy to adjust if you want to mess around with the design
var result = (float) Math.Clamp(slope * (float) Math.Pow(ratio - xOffset, exponent) + yOffset, 0.0, 1.0);
var result = (float) FloatMath.Clamp(slope * (float) Math.Pow(ratio - xOffset, exponent) + yOffset, 0.0, 1.0);
DebugTools.Assert(!float.IsNaN(result));
return result;
}

View File

@@ -12,9 +12,6 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.PixelFormats;
using Color = Robust.Shared.Maths.Color;
using CannyFastMath;
using Math = CannyFastMath.Math;
using MathF = CannyFastMath.MathF;
namespace Content.Client.Parallax
{
@@ -81,7 +78,7 @@ namespace Content.Client.Parallax
private readonly NoiseGenerator.NoiseType NoiseType = NoiseGenerator.NoiseType.Fbm;
private readonly uint Seed = 1234;
private readonly float Persistence = 0.5f;
private readonly float Lacunarity = (float) (Math.TAU / 3);
private readonly float Lacunarity = (float) (Math.PI / 3);
private readonly float Frequency = 1;
private readonly uint Octaves = 3;
private readonly float Threshold;

View File

@@ -20,9 +20,6 @@ using Robust.Shared.Localization;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.ViewVariables;
using CannyFastMath;
using Math = CannyFastMath.Math;
using MathF = CannyFastMath.MathF;
namespace Content.Client.State
{

View File

@@ -6,9 +6,6 @@ using System;
using Robust.Client.Graphics.Shaders;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using CannyFastMath;
using Math = CannyFastMath.Math;
using MathF = CannyFastMath.MathF;
namespace Robust.Client.UserInterface.Controls
{
@@ -45,7 +42,7 @@ namespace Robust.Client.UserInterface.Controls
}
else
{
var alpha = MathF.Clamp(0.5f * lerp, 0f, 0.5f);
var alpha = FloatMath.Clamp(0.5f * lerp, 0f, 0.5f);
color = new Color(1f, 1f, 1f, alpha);
}