Utils.IsZero Method

Definition

Overloads

IsZero(Double)

IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), but this is faster.

IsZero(Vector4)

Verifies if the Vector4 contains only zero values.

IsZero(Single)

IsZero - Returns whether or not the float is "close" to 0. Same as AreClose(float, 0), but this is faster.

IsZero(CornerRadius)

Verifies if the CornerRadius contains only zero values.

IsZero(Thickness)

Verifies if the Thickness contains only zero values.

IsZero(Double)

IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), but this is faster.

C#
public static bool IsZero (this double value);

Parameters

value
Double

The double to compare to 0.

Returns

bool - the result of the AreClose comparison.

Applies to

Windows Community Toolkit 7.1.0 et Windows Community Toolkit 7.0.0
Produit Versions
Windows Community Toolkit 7.0.0, 7.1.0

IsZero(Vector4)

Verifies if the Vector4 contains only zero values.

C#
public static bool IsZero (this System.Numerics.Vector4 vector);

Parameters

vector
Vector4

Vector4

Returns

true if yes, otherwise false

Applies to

Windows Community Toolkit 7.1.0 et Windows Community Toolkit 7.0.0
Produit Versions
Windows Community Toolkit 7.0.0, 7.1.0

IsZero(Single)

IsZero - Returns whether or not the float is "close" to 0. Same as AreClose(float, 0), but this is faster.

C#
public static bool IsZero (this float value);

Parameters

value
Single

The float to compare to 0.

Returns

bool - the result of the AreClose comparison.

Applies to

Windows Community Toolkit 7.1.0 et Windows Community Toolkit 7.0.0
Produit Versions
Windows Community Toolkit 7.0.0, 7.1.0

IsZero(CornerRadius)

Verifies if the CornerRadius contains only zero values.

C#
public static bool IsZero (this Windows.UI.Xaml.CornerRadius corner);

Parameters

corner
CornerRadius

CornerRadius

Returns

true if yes, otherwise false

Applies to

Windows Community Toolkit 7.1.0 et Windows Community Toolkit 7.0.0
Produit Versions
Windows Community Toolkit 7.0.0, 7.1.0

IsZero(Thickness)

Verifies if the Thickness contains only zero values.

C#
public static bool IsZero (this Windows.UI.Xaml.Thickness thick);

Parameters

thick
Thickness

Thickness

Returns

Size

Applies to

Windows Community Toolkit 7.1.0 et Windows Community Toolkit 7.0.0
Produit Versions
Windows Community Toolkit 7.0.0, 7.1.0