Table of Contents

Class FloatExtensionMethods

Namespace
CodeBase
Assembly
4Experience.CodeBase.Core.Runtime.dll
public static class FloatExtensionMethods
Inheritance
FloatExtensionMethods

Methods

IsInRange(float, float, float)

Checking if an float value is in a two-way closed set. A. 0.99 is in the set [-1, 1]. B. -1.10 is not in the set [-1, 1].

public static bool IsInRange(this float source, float min, float max)

Parameters

source float
min float
max float

Returns

bool

IsInRange(float, Vector2)

Checking if an float value is in a two-way closed set. Range based on Vector2 value - no matter x or y is greater. A. 0.99 is in the set [-1, 1]. B. -1.10 is not in the set [-1, 1].

public static bool IsInRange(this float source, Vector2 range)

Parameters

source float
range Vector2

Returns

bool