Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | List of all members
RUIutils Class Reference

Classes

class  FuncComparer< T >
 

Static Public Member Functions

static bool All< T > (List< T > list, params Func< T, bool >[] predicates)
 
static bool All< T > (List< T > list, Func< T, bool > predicate)
 
static bool All< T > (T[] list, Func< T, bool > predicate)
 
static Func< T, bool > And< T > (params Func< T, bool >[] predicates)
 
static bool Any< T > (List< T > list, Func< T, bool > predicate)
 
static bool Any< T > (T[] list, Func< T, bool > predicate)
 
static Vector3 CamToCamReposition (Vector3 originalPos, Camera fromCam, Camera toCam)
 
static string ColorToHex (Color32 c, bool alpha=false)
 
static int Count< T > (T[] list, Func< T, bool > predicate)
 
static string CutString (string s, int l, string add)
 
static string DecToHex (int n, bool doubleDigit=true)
 
static string GetYesNoUIString (bool yes)
 
static char HexToChar (string hex, bool doubleDigit=true)
 
static string Repeat (string repeat, int count)
 
static int SortAscDescPrimarySecondary (bool asc, int comp1, int comp2)
 Sorts by comp1 asc/desc and if both are equal, sorts by comp2 always asc More...
 
static int SortAscDescPrimarySecondary (bool asc, params int[] comp)
 Sorts by comp[0] to comp[n] asc/desc by the first comp != 0 More...
 
static string StringListToString (List< string > list)
 
static int Sum< T > (List< T > list, Func< T, int > predicate)
 
static double Sum< T > (List< T > list, Func< T, double > predicate)
 
static List< T > Where< T > (List< T > list, Func< T, bool > predicate)
 Returns a list where all elements satisfied the condition predicate. More...
 
static List< T > WhereMutating< T > (ref List< T > list, Func< T, bool > predicate)
 Returns a modified list where all elements satisfied the condition predicate. Modifies the input list More...
 

Member Function Documentation

static bool RUIutils.All< T > ( List< T >  list,
params Func< T, bool >[]  predicates 
)
inlinestatic
static bool RUIutils.All< T > ( List< T >  list,
Func< T, bool >  predicate 
)
inlinestatic
static bool RUIutils.All< T > ( T[]  list,
Func< T, bool >  predicate 
)
inlinestatic
static Func<T, bool> RUIutils.And< T > ( params Func< T, bool >[]  predicates)
inlinestatic
static bool RUIutils.Any< T > ( List< T >  list,
Func< T, bool >  predicate 
)
inlinestatic
static bool RUIutils.Any< T > ( T[]  list,
Func< T, bool >  predicate 
)
inlinestatic
static Vector3 RUIutils.CamToCamReposition ( Vector3  originalPos,
Camera  fromCam,
Camera  toCam 
)
inlinestatic
static string RUIutils.ColorToHex ( Color32  c,
bool  alpha = false 
)
inlinestatic
static int RUIutils.Count< T > ( T[]  list,
Func< T, bool >  predicate 
)
inlinestatic
static string RUIutils.CutString ( string  s,
int  l,
string  add 
)
inlinestatic
static string RUIutils.DecToHex ( int  n,
bool  doubleDigit = true 
)
inlinestatic
static string RUIutils.GetYesNoUIString ( bool  yes)
inlinestatic
static char RUIutils.HexToChar ( string  hex,
bool  doubleDigit = true 
)
inlinestatic
static string RUIutils.Repeat ( string  repeat,
int  count 
)
inlinestatic
static int RUIutils.SortAscDescPrimarySecondary ( bool  asc,
int  comp1,
int  comp2 
)
inlinestatic

Sorts by comp1 asc/desc and if both are equal, sorts by comp2 always asc

Parameters
asc
comp1
comp2
Returns
static int RUIutils.SortAscDescPrimarySecondary ( bool  asc,
params int[]  comp 
)
inlinestatic

Sorts by comp[0] to comp[n] asc/desc by the first comp != 0

Parameters
asc
comp
Returns
static string RUIutils.StringListToString ( List< string >  list)
inlinestatic
static int RUIutils.Sum< T > ( List< T >  list,
Func< T, int >  predicate 
)
inlinestatic
static double RUIutils.Sum< T > ( List< T >  list,
Func< T, double >  predicate 
)
inlinestatic
static List<T> RUIutils.Where< T > ( List< T >  list,
Func< T, bool >  predicate 
)
inlinestatic

Returns a list where all elements satisfied the condition predicate.

Template Parameters
T
Parameters
list
predicate
Returns
static List<T> RUIutils.WhereMutating< T > ( ref List< T >  list,
Func< T, bool >  predicate 
)
inlinestatic

Returns a modified list where all elements satisfied the condition predicate. Modifies the input list

Template Parameters
T
Parameters
list
predicate
Returns

The documentation for this class was generated from the following file: