Skip to content

DiGi.ComputeSharp.Planar

github-actions[bot] edited this page Jul 1, 2026 · 3 revisions

DiGi.ComputeSharp.Planar Namespace

Classes

Modify Class

public static class Modify

Inheritance System.Object → Modify

Methods

Modify.SwapIfCrossProductNegative(int, int, Coordinate2, Coordinate2) Method

Swaps two provided indices if the cross product of the given vectors is negative, or if the first vector is NaN while the second is not.

public static bool SwapIfCrossProductNegative(ref int index_1, ref int index_2, DiGi.ComputeSharp.Planar.Classes.Coordinate2 vector_1, DiGi.ComputeSharp.Planar.Classes.Coordinate2 vector_2);

Parameters

index_1 System.Int32

A reference to the first index to be potentially swapped.

index_2 System.Int32

A reference to the second index to be potentially swapped.

vector_1 Coordinate2

The first coordinate vector used for the cross product calculation.

vector_2 Coordinate2

The second coordinate vector used for the cross product calculation.

Returns

System.Boolean
True if the indices were swapped; otherwise, false.

Clone this wiki locally