Method GetOffset
- Namespace
- Zyl.VectorTraits.Impl.Util
- Assembly
- VectorTraits.dll
GetOffset<T>(ref T, ref T)
Determines byte offset from origin to target from the given references (确定给定托管指针从源到目标的字节偏移量).
public static nint GetOffset<T>(ref T origin, ref T target)
Parameters
origin
TThe reference to origin (指向源的托管指针).
target
TThe reference to target (指向目标的托管指针).
Returns
- nint
The offset from origin to target (从源到目标的偏移量). i.e.
target - origin
.
Type Parameters
T
The elemental type of the managed pointer (托管指针的元素类型).
- See Also
-
ByteOffset<T>(ref readonly T, ref readonly T)