if anyone has an idea for a better implementation for this, let me know ```cs public static bool

if anyone has an idea for a better implementation for this, let me know
    public static bool TryConvertFromChecked<TOther>(TOther value, out Vector3<T> result) where TOther : INumberBase<TOther>
    {
        if (value is Vector3<T> v)
        {
            result = v;
            return true;
        }
        
        // TODO: An interface could be added here to make things work. But if it causes boxing even with JIT optimizations, it's probably not worth it.

        result = default;
        return false;
    }

i wonder if the JIT can devirtualize something like this?
Was this page helpful?