SetCenter() public method

public SetCenter ( int x, int y, int z ) : void
x int
y int
z int
return void
Example #1
0
 private void SetCenterRandomlyForEmptyCluster(ClusterPrototype cluster)
 {
     if (cluster.PointCount == 0)
     {
         cluster.SetCenter(this.random.Next(0, this.size.Width - 1), this.random.Next(0, this.size.Height - 1), this.random.Next((int)this.zRange.Min, (int)this.zRange.Max));
     }
 }
Example #2
0
 private void SetCenterRandomlyForEmptyCluster(ClusterPrototype cluster)
 {
     if (cluster.PointCount == 0)
     {
         cluster.SetCenter(this.random.Next(0, this.size.Width - 1), this.random.Next(0, this.size.Height - 1), this.random.Next((int)this.zRange.Min, (int)this.zRange.Max));
     }
 }
 public void Can_Set_Center()
 {
     var cluster = new ClusterPrototype(Point.Zero);
     cluster.SetCenter(1, 2, 3);
     AssertClusterCenterIsAt(cluster, 1, 2, 3);
 }