Table of Contents

Class ResourceSystemUtilities

Namespace
KSP.Sim.ResourceSystem
Assembly
Assembly-CSharp.dll
public static class ResourceSystemUtilities
Inheritance
ResourceSystemUtilities
Inherited Members

Fields

RUNTIME_TOLERANCE

public const double RUNTIME_TOLERANCE = 1E-08

Field Value

double

Methods

Clamp(double, double, double)

public static double Clamp(double value, double min, double max)

Parameters

value double
min double
max double

Returns

double

EnsureArrayIsLargeEnough<T>(ref T[], int)

public static void EnsureArrayIsLargeEnough<T>(ref T[] array, int requestedIndex)

Parameters

array T[]
requestedIndex int

Type Parameters

T

EnsureListIsLargeEnough<T>(List<T>, int)

public static void EnsureListIsLargeEnough<T>(List<T> list, int requestedIndex)

Parameters

list List<T>
requestedIndex int

Type Parameters

T

NextPowerOf2(int)

public static int NextPowerOf2(int number)

Parameters

number int

Returns

int

ReportOrThrow(ErrorReportMode, LogFilter, string)

public static void ReportOrThrow(ResourceSystemUtilities.ErrorReportMode nonSilentErrorReportMode, LogFilter logFilter, string msg)

Parameters

nonSilentErrorReportMode ResourceSystemUtilities.ErrorReportMode
logFilter LogFilter
msg string

ReportOrThrow(ErrorReportMode, string)

public static void ReportOrThrow(ResourceSystemUtilities.ErrorReportMode nonSilentErrorReportMode, string msg)

Parameters

nonSilentErrorReportMode ResourceSystemUtilities.ErrorReportMode
msg string

SanitizeNameString(string)

public static string SanitizeNameString(string resourceName)

Parameters

resourceName string

Returns

string

SetWithDirty<T>(ref T, T, ref bool)

public static bool SetWithDirty<T>(ref T field, T value, ref bool dirtyField)

Parameters

field T
value T
dirtyField bool

Returns

bool

Type Parameters

T