Example #1
0
std::vector<scigraphics::number> scigraphics::markerLinear::marksWithStepVector( const interval<number> Interval, const number Steps[] ) const
{
  assert( Steps != NULL );
  
  std::vector<number> Result;

  for ( number Order = std::pow( 10, baseOrder(Interval.distance()) - 2 ); Order < Interval.distance() * 10; Order *= 10 )
  {
    for ( const number *Step = &Steps[0]; *Step != 0; ++Step )
    {
      Result = marksWithStep( Interval, *Step * Order );
      if ( vectorInMarkLimits(Result) )
        return Result;
    }
  }

  return Result;
}
Example #2
0
scigraphics::number scigraphics::marker::epsilonForInterval( interval<number> Interval )
{
  return std::numeric_limits<number>::epsilon() * Interval.distance() * 3;
}