mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
removed reload command
prevent control characters from being used in name added MOD_HEAD_SHOT to hit location increment css fix for alias dropdown testing view angle analysis
This commit is contained in:
26
Plugins/SimpleStats/Helpers/Extensions.cs
Normal file
26
Plugins/SimpleStats/Helpers/Extensions.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using SharedLibrary.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
{
|
||||
static class Extensions
|
||||
{
|
||||
|
||||
public static Vector3 FixIW4Angles(this Vector3 vector)
|
||||
{
|
||||
float X = vector.X > 0 ? 360.0f - vector.X : Math.Abs(vector.X);
|
||||
float Y = vector.Y > 0 ? 360.0f - vector.Y : Math.Abs(vector.Y);
|
||||
float Z = vector.Z > 0 ? 360.0f - vector.Z : Math.Abs(vector.Z);
|
||||
|
||||
return new Vector3(X, Y, Z);
|
||||
}
|
||||
|
||||
public static float ToRadians(this float value) => (float)Math.PI * value / 180.0f;
|
||||
|
||||
public static float ToDegrees(this float value) => value * 180.0f / (float)Math.PI;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user