Table of Contents

Class IntExtensionMethods

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

Methods

InvertValue(int)

Returns inverted value of int. For 2 it will return -2.

public static int InvertValue(this int source)

Parameters

source int

Returns

int

IsInRange(int, int, int)

Checking if an int value is in a two-way closed set. It uses a method for the float type. A. 1 is in the set [-1, 1] B. 2 is not in the set [-1, 1]

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

Parameters

source int
min int
max int

Returns

bool

IsInRange(int, Vector2)

Checking if an int value is in a two-way closed set. Range based on Vector2 value - no matter x or y is greater. It uses a method for the float type. A. 1 is in the set [-1, 1] B. 2 is not in the set [-1, 1]

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

Parameters

source int
range Vector2

Returns

bool