Table of Contents

Method ExAs

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

ExAs<TFrom, TTo>(Vector<TFrom>)

(ExType) Reinterprets a Vector<T> of type TFrom as a new Vector<T> of type TTo. It supports ExType, so there is no element type check (将 TFrom 类型的 Vector<T> 重新解释为 TTo 类型的新 Vector<T>. 它支持扩展类型, 故没有元素类型检查).

public static Vector<TTo> ExAs<TFrom, TTo>(this Vector<TFrom> vector) where TFrom : struct where TTo : struct

Parameters

vector Vector<TFrom>

The vector to reinterpret (要重新解释的向量).

Returns

Vector<TTo>

vector reinterpreted as a Vector<T> of type TTo (重新解释为 TTo 类型的 Vector<T> 向量).

Type Parameters

TFrom

The type of the input vector element (输入向量元素的类型).

TTo

The type that the vector vector should be reinterpreted as (向量 vector 应重新解释为的类型).