public static Vector2 Random_OnSegment(Vector2 segmentFrom, Vector2 segmentTo) { return(Interpolation.Linear(segmentFrom, segmentTo, MathHelpers.Random_Factor())); }
public static float Factor_FromRange_Clamped(float rangeFrom, float rangeTo, float curValue) { return(MathHelpers.Clamp_Factor(Factor_FromRange(rangeFrom, rangeTo, curValue))); }
public static Vector2 Random_InCircle(Vector2 center, float radius, float radiusMin = 0.0f) { Vector2 result = center; Vector2 move = Setup_ByAngleMagnitude(MathHelpers.Random_Angle_Looped(), Interpolation.Linear(radiusMin, radius, MathHelpers.Random_Factor())); result += move; return(result); }