Generates new individual particle radius based on min and max radius setting.

@return new particle radius
423989
private float newRandomIndividualParticleRadius(@NonNull final SceneConfiguration scene) {
        return scene.getParticleRadiusMin() == scene.getParticleRadiusMax() ?
                scene.getParticleRadiusMin() : scene.getParticleRadiusMin() + (random.nextInt(
                (int) ((scene.getParticleRadiusMax() - scene.getParticleRadiusMin()) * 100f)))
                / 100f;
    }
595923
public Gauge radius(Object width, Object height) {
        radius = new Object[]{width, height};
        return this;
    }
1203309
function() {
    var aabb = this.getAABB();
    var sphere = { center: aabb.min.add(aabb.max).divide(2), radius: 0 };
    for (var i = 0; i < this.vertices.length; i++) {
      sphere.radius = Math.max(sphere.radius,
        Vector.fromArray(this.vertices[i]).subtract(sphere.center).length());
    }
    return sphere;
  }
231498
public static RandomICAutomatonGenerator<Boolean, Void> forDFA() {
        return new RandomICAutomatonGenerator<Boolean, Void>().withStateProperties(Random::nextBoolean);
    }
119108
@Override
    public final Integer generate(final Integer max) {
        final Integer result;

        if (max < LOWER_LIMIT) {
            LOGGER.warn(
                    "Received {} as maximum value, but this is lower than {}",
                    max, LOWER_LIMIT);
            result = 0;
        } else {
            result = random.nextInt(Math.abs(LOWER_LIMIT - max) + 1)
                    + LOWER_LIMIT;
        }

        return result;
    }
1166728
@Pure
	public IntegerProperty radiusProperty() {
		if (this.radius == null) {
			this.radius = new SimpleIntegerProperty(this, MathFXAttributeNames.RADIUS) {
				@Override
				protected void invalidated() {
					if (get() < 0) {
						set(0);
					}
				}
			};
		}
		return this.radius;
	}
985843
@SneakyThrows
    public RadiusClient newInstance() {
        return new RadiusClient(InetAddress.getByName(this.inetAddress), this.sharedSecret,
            this.authenticationPort, this.accountingPort, this.socketTimeout);
    }
152865
@Pure
	public DoubleProperty radiusProperty() {
		if (this.radius == null) {
			this.radius = new SimpleDoubleProperty(this, MathFXAttributeNames.RADIUS) {
				@Override
				protected void invalidated() {
					if (get() < 0.) {
						set(0.);
					}
				}
			};
		}
		return this.radius;
	}
1312703
def add_particle(
        self,
        pos=(0, 0, 0),
        charge=1e-6,
        mass=1e-3,
        radius=0.005,
        color=None,
        vel=(0, 0, 0),
        fixed=False,
        negligible=False,
    ):
        
        color = color or len(self.particles)  # assigned or default color number

        p = Particle(pos, charge, mass, radius, color, vel, fixed, negligible)
        self.particles.append(p)
1245847
private float[] generateParticleVelocities()
    {
        float [] particleVelocities = new float[mEmitRate * 3];
        Vector3f temp = new Vector3f(0,0,0);
        for ( int i = 0; i < mEmitRate * 3 ; i +=3 )
        {
            temp.x = mParticlePositions[i];
            temp.y = mParticlePositions[i+1];
            temp.z = mParticlePositions[i+2];


            float velx = mRandom.nextFloat() * (maxVelocity.x- minVelocity.x)
                    + minVelocity.x;

            float vely = mRandom.nextFloat() * (maxVelocity.y - minVelocity.y)
                                + minVelocity.y;
            float velz = mRandom.nextFloat() * (maxVelocity.z - minVelocity.z)
                    + minVelocity.z;

            temp = temp.normalize();
            temp.mul(velx, vely, velz, temp);

            particleVelocities[i] = temp.x;
            particleVelocities[i+1] = temp.y;
            particleVelocities[i+2] = temp.z;
        }

        return particleVelocities;

    }
1149823
public static int[] range(int min, int max) {
    int[] range = new int[max - min];
    for (int i = 0; i < (max - min); i++) {
      range[i] = i + min;
    }
    return range;
  }
858181
def new( self, min, max ):
        """"""
        # Ensure the range will fit given the shifting strategy
        assert MIN <= min <= max <= MAX
        self.min = min
        self.max = max
        # Determine offsets to use
        self.offsets = offsets_for_max_size( max )
        # Determine the largest bin we will actually use
        self.bin_count = bin_for_range( max - 1, max, offsets = self.offsets ) + 1
        # Create empty bins
        self.bins = [ [] for i in range( self.bin_count ) ]
10758
def start_new_particles(self):
        
        for e_pos, e_dir, e_vel, e_range, e_color, e_pal in self.emitters:
            for roll in range(self.starts_at_once):
                if random.random() < self.starts_prob:  # Start one?
                    p_vel = self.vel[random.choice(len(self.vel))]
                    if e_dir < 0 or e_dir == 0 and random.random() > 0.5:
                        p_vel = -p_vel
                    self.particles.append((
                        p_vel,  # Velocity
                        e_pos,  # Position
                        int(e_range // abs(p_vel)),  # steps to live
                        e_pal[
                            random.choice(len(e_pal))],  # Color
                        255))
1365516
public Rectangle getMaxRectabgle(){
		return new Rectangle((int)xLB.max, (int)yLB.max, (int)(xUB.max - xLB.max), (int)(yUB.max - yLB.max));
	}
1102896
public Polar radius(Object width, Object height) {
        radius = new Object[]{width, height};
        return this;
    }
286436
public static LinearScaling fromMinMax(double min, double max) {
    double zoom = 1.0 / (max - min);
    return new LinearScaling(zoom, -min * zoom);
  }
402148
public MultipleObjectsBundle generate() {
    // we actually need some clusters.
    if(generators.isEmpty()) {
      throw new AbortException("No clusters specified.");
    }
    // Assert that cluster dimensions agree.
    final int dim = generators.get(0).getDim();
    for(GeneratorInterface c : generators) {
      if(c.getDim() != dim) {
        throw new AbortException("Cluster dimensions do not agree.");
      }
    }
    // Prepare result bundle
    MultipleObjectsBundle bundle = new MultipleObjectsBundle();
    VectorFieldTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<>(DoubleVector.FACTORY, dim);
    bundle.appendColumn(type, new ArrayList<>());
    bundle.appendColumn(TypeUtil.CLASSLABEL, new ArrayList<>());
    bundle.appendColumn(Model.TYPE, new ArrayList<Model>());

    // generate clusters
    ClassLabel[] labels = new ClassLabel[generators.size()];
    Model[] models = new Model[generators.size()];
    initLabelsAndModels(generators, labels, models, relabelClusters);
    final AssignPoint assignment;
    if(!testAgainstModel) {
      assignment = new AssignPoint();
    }
    else if(relabelClusters == null) {
      assignment = new TestModel();
    }
    else if(!relabelDistance) {
      assignment = new AssignLabelsByDensity(labels);
    }
    else {
      assignment = new AssignLabelsByDistance(labels);
    }
    for(int i = 0; i < labels.length; i++) {
      final GeneratorInterface curclus = generators.get(i);
      assignment.newCluster(i, curclus);
      // Only dynamic generators allow rejection / model testing:
      GeneratorInterfaceDynamic cursclus = (curclus instanceof GeneratorInterfaceDynamic) ? (GeneratorInterfaceDynamic) curclus : null;
      int kept = 0;
      while(kept < curclus.getSize()) {
        // generate the "missing" number of points
        List<double[]> newp = curclus.generate(curclus.getSize() - kept);
        for(double[] p : newp) {
          int bestc = assignment.getAssignment(i, p);
          if(bestc < 0) {
            cursclus.incrementDiscarded();
            continue;
          }
          bundle.appendSimple(DoubleVector.wrap(p), labels[bestc], models[bestc]);
          ++kept;
        }
      }
    }
    return bundle;
  }