Skip to content

Commit dc0432b

Browse files
Adjust the vector docs to use langword instead of cref to preserve generic type information where relevant (#106561)
* Adjust the vector docs to use langword instead of cref to preserve generic type information where relevant * Use angle brackets
1 parent 19b5242 commit dc0432b

File tree

16 files changed

+921
-921
lines changed

16 files changed

+921
-921
lines changed

src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix3x2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public Vector2 Translation
161161
/// <summary>Negates the specified matrix by multiplying all its values by -1.</summary>
162162
/// <param name="value">The matrix to negate.</param>
163163
/// <returns>The negated matrix.</returns>
164-
/// <altmember cref="Negate(Matrix3x2)"/>
164+
/// <altmember cref="Negate(Matrix3x2)" />
165165
[MethodImpl(MethodImplOptions.AggressiveInlining)]
166166
public static Matrix3x2 operator -(Matrix3x2 value)
167167
=> (-value.AsImpl()).AsM3x2();

src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public float this[int index]
8282

8383
/// <summary>Gets a value that indicates whether the current instance is the identity quaternion.</summary>
8484
/// <value><see langword="true" /> if the current instance is the identity quaternion; otherwise, <see langword="false" />.</value>
85-
/// <altmember cref="Identity"/>
85+
/// <altmember cref="Identity" />
8686
public readonly bool IsIdentity => this == Identity;
8787

8888
/// <summary>Adds each element in one quaternion with its corresponding element in a second quaternion.</summary>

src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs

Lines changed: 88 additions & 88 deletions
Large diffs are not rendered by default.

src/libraries/System.Private.CoreLib/src/System/Numerics/Vector2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,14 +692,14 @@ public readonly bool TryCopyTo(Span<float> destination)
692692

693693
/// <summary>Returns the length of the vector.</summary>
694694
/// <returns>The vector's length.</returns>
695-
/// <altmember cref="LengthSquared"/>
695+
/// <altmember cref="LengthSquared" />
696696
[Intrinsic]
697697
public readonly float Length() => float.Sqrt(LengthSquared());
698698

699699
/// <summary>Returns the length of the vector squared.</summary>
700700
/// <returns>The vector's length squared.</returns>
701701
/// <remarks>This operation offers better performance than a call to the <see cref="Length" /> method.</remarks>
702-
/// <altmember cref="Length"/>
702+
/// <altmember cref="Length" />
703703
[Intrinsic]
704704
public readonly float LengthSquared() => Dot(this, this);
705705

src/libraries/System.Private.CoreLib/src/System/Numerics/Vector3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,14 @@ public readonly bool TryCopyTo(Span<float> destination)
725725

726726
/// <summary>Returns the length of this vector object.</summary>
727727
/// <returns>The vector's length.</returns>
728-
/// <altmember cref="LengthSquared"/>
728+
/// <altmember cref="LengthSquared" />
729729
[Intrinsic]
730730
public readonly float Length() => float.Sqrt(LengthSquared());
731731

732732
/// <summary>Returns the length of the vector squared.</summary>
733733
/// <returns>The vector's length squared.</returns>
734734
/// <remarks>This operation offers better performance than a call to the <see cref="Length" /> method.</remarks>
735-
/// <altmember cref="Length"/>
735+
/// <altmember cref="Length" />
736736
[Intrinsic]
737737
public readonly float LengthSquared() => Dot(this, this);
738738

src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,14 +723,14 @@ public static Vector4 Transform(Vector4 value, Quaternion rotation)
723723

724724
/// <summary>Returns the length of this vector object.</summary>
725725
/// <returns>The vector's length.</returns>
726-
/// <altmember cref="LengthSquared"/>
726+
/// <altmember cref="LengthSquared" />
727727
[Intrinsic]
728728
public readonly float Length() => float.Sqrt(LengthSquared());
729729

730730
/// <summary>Returns the length of the vector squared.</summary>
731731
/// <returns>The vector's length squared.</returns>
732732
/// <remarks>This operation offers better performance than a call to the <see cref="Length" /> method.</remarks>
733-
/// <altmember cref="Length"/>
733+
/// <altmember cref="Length" />
734734
[Intrinsic]
735735
public readonly float LengthSquared() => Dot(this, this);
736736

src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public T this[int index]
243243
/// <summary>Computes the bitwise-and of two vectors.</summary>
244244
/// <param name="left">The vector to bitwise-and with <paramref name="right" />.</param>
245245
/// <param name="right">The vector to bitwise-and with <paramref name="left" />.</param>
246-
/// <returns>The bitwise-and of <paramref name="left" /> and <paramref name="right"/>.</returns>
246+
/// <returns>The bitwise-and of <paramref name="left" /> and <paramref name="right" />.</returns>
247247
[Intrinsic]
248248
[MethodImpl(MethodImplOptions.AggressiveInlining)]
249249
public static Vector<T> operator &(Vector<T> left, Vector<T> right)
@@ -266,7 +266,7 @@ public T this[int index]
266266
/// <summary>Computes the bitwise-or of two vectors.</summary>
267267
/// <param name="left">The vector to bitwise-or with <paramref name="right" />.</param>
268268
/// <param name="right">The vector to bitwise-or with <paramref name="left" />.</param>
269-
/// <returns>The bitwise-or of <paramref name="left" /> and <paramref name="right"/>.</returns>
269+
/// <returns>The bitwise-or of <paramref name="left" /> and <paramref name="right" />.</returns>
270270
[Intrinsic]
271271
[MethodImpl(MethodImplOptions.AggressiveInlining)]
272272
public static Vector<T> operator |(Vector<T> left, Vector<T> right)
@@ -365,90 +365,90 @@ public T this[int index]
365365
return result.As<ulong, T>();
366366
}
367367

368-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Byte}" />.</summary>
368+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Byte&gt;" />.</summary>
369369
/// <param name="value">The vector to reinterpret.</param>
370-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Byte}" />.</returns>
370+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Byte&gt;" />.</returns>
371371
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
372372
[Intrinsic]
373373
public static explicit operator Vector<byte>(Vector<T> value) => value.As<T, byte>();
374374

375-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Double}" />.</summary>
375+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Double&gt;" />.</summary>
376376
/// <param name="value">The vector to reinterpret.</param>
377-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Double}" />.</returns>
377+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Double&gt;" />.</returns>
378378
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
379379
[Intrinsic]
380380
public static explicit operator Vector<double>(Vector<T> value) => value.As<T, double>();
381381

382-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Int16}" />.</summary>
382+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Int16&gt;" />.</summary>
383383
/// <param name="value">The vector to reinterpret.</param>
384-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Int16}" />.</returns>
384+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Int16&gt;" />.</returns>
385385
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
386386
[Intrinsic]
387387
public static explicit operator Vector<short>(Vector<T> value) => value.As<T, short>();
388388

389-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Int32}" />.</summary>
389+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Int32&gt;" />.</summary>
390390
/// <param name="value">The vector to reinterpret.</param>
391-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Int32}" />.</returns>
391+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Int32&gt;" />.</returns>
392392
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
393393
[Intrinsic]
394394
public static explicit operator Vector<int>(Vector<T> value) => value.As<T, int>();
395395

396-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Int64}" />.</summary>
396+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Int64&gt;" />.</summary>
397397
/// <param name="value">The vector to reinterpret.</param>
398-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Int64}" />.</returns>
398+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Int64&gt;" />.</returns>
399399
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
400400
[Intrinsic]
401401
public static explicit operator Vector<long>(Vector<T> value) => value.As<T, long>();
402402

403-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{IntPtr}" />.</summary>
403+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;IntPtr&gt;" />.</summary>
404404
/// <param name="value">The vector to reinterpret.</param>
405-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{IntPtr}" />.</returns>
405+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;IntPtr&gt;" />.</returns>
406406
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
407407
[Intrinsic]
408408
public static explicit operator Vector<nint>(Vector<T> value) => value.As<T, nint>();
409409

410-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{UIntPtr}" />.</summary>
410+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;UIntPtr&gt;" />.</summary>
411411
/// <param name="value">The vector to reinterpret.</param>
412-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{UIntPtr}" />.</returns>
412+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;UIntPtr&gt;" />.</returns>
413413
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
414414
[Intrinsic]
415415
[CLSCompliant(false)]
416416
public static explicit operator Vector<nuint>(Vector<T> value) => value.As<T, nuint>();
417417

418-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{SByte}" />.</summary>
418+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;SByte&gt;" />.</summary>
419419
/// <param name="value">The vector to reinterpret.</param>
420-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{SByte}" />.</returns>
420+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;SByte&gt;" />.</returns>
421421
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
422422
[Intrinsic]
423423
[CLSCompliant(false)]
424424
public static explicit operator Vector<sbyte>(Vector<T> value) => value.As<T, sbyte>();
425425

426-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{Single}" />.</summary>
426+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;Single&gt;" />.</summary>
427427
/// <param name="value">The vector to reinterpret.</param>
428-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{Single}" />.</returns>
428+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;Single&gt;" />.</returns>
429429
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
430430
[Intrinsic]
431431
public static explicit operator Vector<float>(Vector<T> value) => value.As<T, float>();
432432

433-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{UInt16}" />.</summary>
433+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;UInt16&gt;" />.</summary>
434434
/// <param name="value">The vector to reinterpret.</param>
435-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{UInt16}" />.</returns>
435+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;UInt16&gt;" />.</returns>
436436
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
437437
[Intrinsic]
438438
[CLSCompliant(false)]
439439
public static explicit operator Vector<ushort>(Vector<T> value) => value.As<T, ushort>();
440440

441-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{UInt32}" />.</summary>
441+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;UInt32&gt;" />.</summary>
442442
/// <param name="value">The vector to reinterpret.</param>
443-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{UInt32}" />.</returns>
443+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;UInt32&gt;" />.</returns>
444444
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
445445
[Intrinsic]
446446
[CLSCompliant(false)]
447447
public static explicit operator Vector<uint>(Vector<T> value) => value.As<T, uint>();
448448

449-
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector{UInt64}" />.</summary>
449+
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see langword="Vector&lt;UInt64&gt;" />.</summary>
450450
/// <param name="value">The vector to reinterpret.</param>
451-
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{UInt64}" />.</returns>
451+
/// <returns><paramref name="value" /> reinterpreted as a new <see langword="Vector&lt;UInt64&gt;" />.</returns>
452452
/// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
453453
[Intrinsic]
454454
[CLSCompliant(false)]

src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/ISimdVector_2.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ internal unsafe interface ISimdVector<TSelf, T>
102102
/// <summary>Computes the bitwise-and of two vectors.</summary>
103103
/// <param name="left">The vector to bitwise-and with <paramref name="right" />.</param>
104104
/// <param name="right">The vector to bitwise-and with <paramref name="left" />.</param>
105-
/// <returns>The bitwise-and of <paramref name="left" /> and <paramref name="right"/>.</returns>
105+
/// <returns>The bitwise-and of <paramref name="left" /> and <paramref name="right" />.</returns>
106106
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right" /> (<typeparamref name="T" />) is not supported.</exception>
107107
static virtual TSelf BitwiseAnd(TSelf left, TSelf right) => left & right;
108108

109109
/// <summary>Computes the bitwise-or of two vectors.</summary>
110110
/// <param name="left">The vector to bitwise-or with <paramref name="right" />.</param>
111111
/// <param name="right">The vector to bitwise-or with <paramref name="left" />.</param>
112-
/// <returns>The bitwise-or of <paramref name="left" /> and <paramref name="right"/>.</returns>
112+
/// <returns>The bitwise-or of <paramref name="left" /> and <paramref name="right" />.</returns>
113113
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right" /> (<typeparamref name="T" />) is not supported.</exception>
114114
static virtual TSelf BitwiseOr(TSelf left, TSelf right) => left | right;
115115

@@ -520,24 +520,24 @@ static virtual TSelf LoadAligned(T* source)
520520
/// <param name="left">The vector to multiply with <paramref name="right" />.</param>
521521
/// <param name="right">The vector to multiply with <paramref name="left" />.</param>
522522
/// <returns>The element-wise product of <paramref name="left" /> and <paramref name="right" />.</returns>
523-
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right"/> (<typeparamref name="T" />) is not supported.</exception>
523+
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right" /> (<typeparamref name="T" />) is not supported.</exception>
524524
static virtual TSelf Multiply(TSelf left, TSelf right) => left * right;
525525

526526
/// <summary>Multiplies a vector by a scalar to compute their product.</summary>
527527
/// <param name="left">The vector to multiply with <paramref name="right" />.</param>
528528
/// <param name="right">The scalar to multiply with <paramref name="left" />.</param>
529529
/// <returns>The product of <paramref name="left" /> and <paramref name="right" />.</returns>
530-
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right"/> (<typeparamref name="T" />) is not supported.</exception>
530+
/// <exception cref="NotSupportedException">The type of <paramref name="left" /> and <paramref name="right" /> (<typeparamref name="T" />) is not supported.</exception>
531531
static virtual TSelf Multiply(TSelf left, T right) => left * right;
532532

533-
/// <summary>Computes an estimate of (<paramref name="left"/> * <paramref name="right"/>) + <paramref name="addend"/>.</summary>
533+
/// <summary>Computes an estimate of (<paramref name="left" /> * <paramref name="right" />) + <paramref name="addend" />.</summary>
534534
/// <param name="left">The vector to be multiplied with <paramref name="right" />.</param>
535535
/// <param name="right">The vector to be multiplied with <paramref name="left" />.</param>
536536
/// <param name="addend">The vector to be added to the result of <paramref name="left" /> multiplied by <paramref name="right" />.</param>
537-
/// <returns>An estimate of (<paramref name="left"/> * <paramref name="right"/>) + <paramref name="addend"/>.</returns>
537+
/// <returns>An estimate of (<paramref name="left" /> * <paramref name="right" />) + <paramref name="addend" />.</returns>
538538
/// <remarks>
539539
/// <para>On hardware that natively supports <c>FusedMultiplyAdd</c>, this may return a result that was rounded as one ternary operation.</para>
540-
/// <para>On hardware without specialized support, this may just return (<paramref name="left"/> * <paramref name="right"/>) + <paramref name="addend"/>.</para>
540+
/// <para>On hardware without specialized support, this may just return (<paramref name="left" /> * <paramref name="right" />) + <paramref name="addend" />.</para>
541541
/// </remarks>
542542
static abstract TSelf MultiplyAddEstimate(TSelf left, TSelf right, TSelf addend);
543543

0 commit comments

Comments
 (0)