double dStep = asDouble( sc.getStep( ) ).doubleValue( ); return da[0] - ( ( ( dValue - dMinimum ) / dStep ) * ( da[0] - da[1] ) );
double dMaximum = asDouble( sc.getMaximum( ) ).doubleValue( ); double[] ea = sc.getEndPoints( );  return ea[0] - ( ( ( dValue - dMinimum ) / ( dMaximum - dMinimum ) ) * ( ea[0] - ea[1] ) );
	public static final double getLocation( AutoScale sc, IntersectionValue iv )	{		double[] da = sc.getTickCordinates( );		if ( iv.getType( ) == IntersectionValue.MIN )		{			return da[0];		}		else if ( iv.getType( ) == IntersectionValue.MAX )		{			return da[da.length - 1];		}		if ( ( sc.getType( ) & TEXT ) == TEXT || sc.isCategoryScale( ) )		{			double dValue = iv.getValueAsDouble( sc );			return da[0] + ( da[1] - da[0] ) * dValue;		}		else if ( ( sc.getType( ) & DATE_TIME ) == DATE_TIME )		{			CDateTime cdtValue = asDateTime( iv.getValue( ) );			CDateTime cdt = asDateTime( sc.getMinimum( ) ), cdtPrev = null;			int iUnit = asInteger( sc.getUnit( ) );			int iStep = asInteger( sc.getStep( ) );			for ( int i = 0; i < da.length; i++ )			{				if ( cdt.after( cdtValue ) )				{					if ( cdtPrev == null )					{						return da[i];					}					/*					 * SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy					 * HH:mm:ss"); String sMin = sdf.format(cdtPrev.getTime());					 * String sMax = sdf.format(cdt.getTime()); String sVal =					 * sdf.format(cdtValue.getTime());					 */					long l1 = cdtPrev.getTimeInMillis( );					long l2 = cdt.getTimeInMillis( );					long l = cdtValue.getTimeInMillis( );					double dUnitSize = da[i] - da[i - 1];					double dOffset = ( dUnitSize / ( l2 - l1 ) ) * ( l - l1 );					return da[i - 1] + dOffset;				}				cdtPrev = cdt;				cdt = cdt.forward( iUnit, iStep );			}			return da[da.length - 1];		}		else if ( ( sc.getType( ) & LOGARITHMIC ) == LOGARITHMIC )		{			double dValue = iv.getValueAsDouble( sc );			if ( dValue == 0 ) // CANNOT GO TO '0'			{				return sc.getStart( );			}			if ( dValue < 0 )			{				return sc.getStart( );			}			double dMinimumLog = Math.log( asDouble( sc.getMinimum( ) ).doubleValue( ) )					/ LOG_10;			double dStepLog = Math.log( asDouble( sc.getStep( ) ).doubleValue( ) )					/ LOG_10;			double dValueLog = Math.log( dValue ) / LOG_10;			return da[0]					- ( ( ( dValueLog - dMinimumLog ) / dStepLog ) * ( da[0] - da[1] ) );		}		else		{			double dValue = iv.getValueAsDouble( sc );			double dMinimum = asDouble( sc.getMinimum( ) ).doubleValue( );			double dStep = asDouble( sc.getStep( ) ).doubleValue( );			return da[0]					- ( ( ( dValue - dMinimum ) / dStep ) * ( da[0] - da[1] ) );		}	}