public static float GetRandomRadianAngleBetween(float angle, float radianEitherSide) { float angleMin = angle - radianEitherSide; float angleMax = angle + radianEitherSide; float newAngle = RandomController.GetRandomFloat(angleMin, angleMax); newAngle = newAngle % AngleStuff.pieTwo; if (newAngle < 0) { newAngle = newAngle + AngleStuff.pieTwo; } return(newAngle); }
private void SetDrawSize(Vector2 startDrawSize) { //randomizing the draw size slightly float sizeDif = 0.5f; float minX = startDrawSize.X - (startDrawSize.X * sizeDif); float maxX = startDrawSize.X + (startDrawSize.X * sizeDif); float minY = startDrawSize.Y - (startDrawSize.Y * sizeDif); float maxY = startDrawSize.Y + (startDrawSize.Y * sizeDif); drawSize = new Vector2(RandomController.GetRandomFloat(minX, maxX), RandomController.GetRandomFloat(minY, maxY)); if (life > 0) { drawSize = drawSize + (increaseSize * life); } }