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

@@ -1,6 +1,6 @@
using Content.Shared.GameObjects.Components.Inventory;
using System;
using Content.Shared.GameObjects.Components.Inventory;
using Robust.Shared.GameObjects;
using Math = CannyFastMath.Math;
namespace Content.Server.GameObjects
{

View File

@@ -15,10 +15,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using CannyFastMath;
using Content.Shared.Interfaces.GameObjects.Components;
using Math = CannyFastMath.Math;
using MathF = CannyFastMath.MathF;
namespace Content.Server.GameObjects.Components.Weapon.Melee
{

View File

@@ -180,7 +180,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
{
var currentTime = _gameTiming.CurTime;
var timeSinceLastFire = (currentTime - _lastFire).TotalSeconds;
var newTheta = Math.Clamp(_currentAngle.Theta + _angleIncrease - _angleDecay * timeSinceLastFire, _minAngle.Theta, _maxAngle.Theta);
var newTheta = FloatMath.Clamp(_currentAngle.Theta + _angleIncrease - _angleDecay * timeSinceLastFire, _minAngle.Theta, _maxAngle.Theta);
_currentAngle = new Angle(newTheta);
var random = (_robustRandom.NextDouble() - 0.5) * 2;