Show / Hide Table of Contents

Class ExtensionsColorNumerics

Extensions to convert Vector4 to/from Color.

Inheritance
object
ExtensionsColorNumerics
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: System.Numerics
Assembly: SadConsole.Debug.MonoGame.dll
Syntax
public static class ExtensionsColorNumerics

Methods

ToColor(Vector3)

Converts a Vector3 to a Color.

Declaration
public static Color ToColor(this Vector3 value)
Parameters
Type Name Description
Vector3 value

The vector color to convert.

Returns
Type Description
Color

The Color representing the color.

ToColor(Vector4)

Converts a Vector4 to a Color.

Declaration
public static Color ToColor(this Vector4 value)
Parameters
Type Name Description
Vector4 value

The vector color to convert.

Returns
Type Description
Color

The Color representing the color.

ToUV(Point, Point)

Gets a Vector2 representing the UV coordinates of a Point within a Point size.

Declaration
public static Vector2 ToUV(this Point point, Point size)
Parameters
Type Name Description
Point point

The coordinates within the size.

Point size

The size.

Returns
Type Description
Vector2

The UV coordinates.

ToVector2(Point)

Converts a Point to a Vector2.

Declaration
public static Vector2 ToVector2(this Point point)
Parameters
Type Name Description
Point point

The point to convert.

Returns
Type Description
Vector2

The Vector2 representing the point.

ToVector3(Color)

Converts a Color to a Vector3.

Declaration
public static Vector3 ToVector3(this Color color)
Parameters
Type Name Description
Color color

The color to convert.

Returns
Type Description
Vector3

The Vector3 representing the color.

ToVector4(Color)

Converts a Color to a Vector4.

Declaration
public static Vector4 ToVector4(this Color color)
Parameters
Type Name Description
Color color

The color to convert.

Returns
Type Description
Vector4

The Vector4 representing the color.

In this article

Back to top

Back to top Generated by DocFX