fCraft.Forester.ConeTree.ShapeFunc C# (CSharp) Method

ShapeFunc() protected method

protected ShapeFunc ( int y ) : float
y int
return float
            protected override float ShapeFunc( int y )
            {
                float twigs = base.ShapeFunc( y );
                if ( twigs >= 0 )
                    return twigs;
                if ( y < Height * ( .25 + .05 * Math.Sqrt( Args.Rand.NextDouble() ) ) ) {
                    return -1;
                }
                float radius = ( Height - y ) * .382f;
                if ( radius < 0 )
                    radius = 0;
                return radius;
            }
Forester.ConeTree