shit, what constaint do i need for generic .Abs()
shit, what constaint do i need for generic .Abs()

public static TFloat Distance<TFloat>(Vector3<T> value1, Vector3<T> value2) where TFloat : INumber<TFloat>, IFloatingPoint<TFloat>TFloat.Sqrt over Math/MathFMath/MathF nowadays, they're just more convenient and easier, plus no more need to cast to int etc when working with integer types
IFloatingPointXYZ<> interface directly, instead only requiring IRootFunctions<T> or ITrigonometricFunctions<T> etcVectorX<T> type to another VectorX<T> type?T?CreateChecked is your best friendfloat.CreateChecked existed in my older generic math implementationsConvert.ChangeType or whatever the similar function is calledpublic static TFloat Distance<TFloat>(Vector3<T> value1, Vector3<T> value2) where TFloat : INumber<TFloat>, IFloatingPoint<TFloat>TFloat.SqrtMath/MathFMath/MathFIFloatingPointXYZ<>IRootFunctions<T>ITrigonometricFunctions<T>VectorX<T>VectorX<T>CreateCheckedfloat.CreateCheckedConvert.ChangeType public interface IFloatingPointIeee754<TSelf>
: IExponentialFunctions<TSelf>,
IFloatingPoint<TSelf>,
IHyperbolicFunctions<TSelf>,
ILogarithmicFunctions<TSelf>,
IPowerFunctions<TSelf>,
IRootFunctions<TSelf>,
ITrigonometricFunctions<TSelf>
where TSelf : IFloatingPointIeee754<TSelf>?