Table of Contents

Class Point

Namespace
Sdl3Sharp.Video.Drawing
Assembly
Sdl3Sharp.dll

Provides extension methods for Point<T>

public static class Point
Inheritance
Point
Inherited Members

Methods

EqualsWithinEpsilon<T>(in Point<T>, in Point<T>, in T, IDispatchComparable<T>?)

Indicates whether two points are equal within a specified epsilon

public static bool EqualsWithinEpsilon<T>(this in Point<T> value, in Point<T> other, in T epsilon, Math.IDispatchComparable<T>? _ = null) where T : unmanaged, IEquatable<T>, IFormattable, ISpanFormattable, IEqualityOperators<T, T, bool>, IComparable<T>, INumberBase<T>

Parameters

value Point<T>

The first point

other Point<T>

The second point

epsilon T

The tolerance for equality

_ Math.IDispatchComparable<T>

Please ignore and do not explicitly set this parameter

Returns

bool

true, if the points are considered equal within the specified epsilon; otherwise, false

Type Parameters

T

The type of the coordinates of the points

Remarks

This method works for types of value and other T which implement IComparable<T>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes EqualsWithinEpsilon<T>(in Point<T>, in Point<T>, in T, IDispatchComparisonOperators<T>?) instead.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of value and other T which implement IComparable<T>.

EqualsWithinEpsilon<T>(in Point<T>, in Point<T>, in T, IDispatchComparisonOperators<T>?)

Indicates whether two points are equal within a specified epsilon

public static bool EqualsWithinEpsilon<T>(this in Point<T> value, in Point<T> other, in T epsilon, Math.IDispatchComparisonOperators<T>? _ = null) where T : unmanaged, IEquatable<T>, IFormattable, ISpanFormattable, IEqualityOperators<T, T, bool>, IComparisonOperators<T, T, bool>, INumberBase<T>

Parameters

value Point<T>

The first point

other Point<T>

The second point

epsilon T

The tolerance for equality

_ Math.IDispatchComparisonOperators<T>

Please ignore and do not explicitly set this parameter

Returns

bool

true, if the points are considered equal within the specified epsilon; otherwise, false

Type Parameters

T

The type of the coordinates of the points

Remarks

This method works for types of value and other T which implement IComparisonOperators<TSelf, TOther, TResult>. If T implements both IComparisonOperators<TSelf, TOther, TResult> and IComparable<T>, overload resolution prioritizes this method.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of value and other T which implement IComparisonOperators<TSelf, TOther, TResult>.