Skip to content

Class LemonUI::Extensions::FloatExtensions

ClassList > LemonUI > Extensions > FloatExtensions

Extensions for the float class.

Public Static Functions

Type Name
float ToXAbsolute (this float fin)
Converts an relative X or Width float to an scaled one.
float ToXRelative (this float fin)
Converts a scaled X or Width float to a relative one.
float ToYAbsolute (this float fin)
Converts an relative Y or Height float to an scaled one.
float ToYRelative (this float fin)
Converts a scaled Y or Height float to a relative one.

Public Static Functions Documentation

function ToXAbsolute

Converts an relative X or Width float to an scaled one.

static float LemonUI::Extensions::FloatExtensions::ToXAbsolute (
    this float fin
) 

Parameters:

  • fin The float to convert.

Returns:

A scaled float.

function ToXRelative

Converts a scaled X or Width float to a relative one.

static float LemonUI::Extensions::FloatExtensions::ToXRelative (
    this float fin
) 

Parameters:

  • fin The float to convert.

Returns:

A relative float between 0 and 1.

function ToYAbsolute

Converts an relative Y or Height float to an scaled one.

static float LemonUI::Extensions::FloatExtensions::ToYAbsolute (
    this float fin
) 

Parameters:

  • fin The float to convert.

Returns:

A scaled float.

function ToYRelative

Converts a scaled Y or Height float to a relative one.

static float LemonUI::Extensions::FloatExtensions::ToYRelative (
    this float fin
) 

Parameters:

  • fin The float to convert.

Returns:

A relative float between 0 and 1.


The documentation for this class was generated from the following file repos/LemonUI/LemonUI/Extensions/FloatExtensions.cs