1. 30 Nov, 2012 1 commit
  2. 27 Nov, 2012 1 commit
  3. 20 Nov, 2012 1 commit
  4. 21 Sep, 2012 1 commit
  5. 31 Aug, 2012 1 commit
  6. 04 Aug, 2012 1 commit
  7. 03 Aug, 2012 1 commit
  8. 02 Aug, 2012 2 commits
  9. 01 Aug, 2012 1 commit
  10. 31 Jul, 2012 2 commits
  11. 30 Jul, 2012 1 commit
  12. 25 Jul, 2012 2 commits
  13. 13 Jul, 2012 1 commit
  14. 10 Jun, 2012 1 commit
  15. 05 Jun, 2012 1 commit
  16. 16 May, 2012 1 commit
  17. 30 Apr, 2012 1 commit
  18. 25 Apr, 2012 1 commit
  19. 23 Apr, 2012 1 commit
  20. 19 Apr, 2012 1 commit
    • Dick Hollenbeck's avatar
      // Dick Hollenbeck's KiROUND R&D · c24863c0
      Dick Hollenbeck authored
      // This provides better project control over rounding to int from double
      // than wxRound() did.  This scheme provides better logging in Debug builds
      // and it provides for compile time calculation of constants.
      
      
      #include <stdio.h>
      #include <assert.h>
      #include <limits.h>
      
      //-----<KiROUND KIT>------------------------------------------------------------
      
      /**
       * KiROUND
       * rounds a floating point number to an int using
       * "round halfway cases away from zero".
       * In Debug build an assert fires if will not fit into an int.
       */
      
      #if defined( DEBUG )
      
      // DEBUG: a macro to capture line and file, then calls this inline
      
      static inline int KiRound( double v, int line, const char* filename )
      {
          v = v < 0 ? v - 0.5 : v + 0.5;
          if( v > INT_MAX + 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          else if( v < INT_MIN - 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          return int( v );
      }
      
      #define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )
      
      #else
      
      // RELEASE: a macro so compile can pre-compute constants.
      
      #define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )
      
      #endif
      
      
      //-----</KiROUND KIT>-----------------------------------------------------------
      
      // Only a macro is compile time calculated, an inline function causes a static constructor
      // in a situation like this.
      // Therefore the Release build is best done with a MACRO not an inline function.
      int Computed = KiROUND( 14.3 * 8 );
      
      
      int main( int argc, char** argv )
      {
          for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
          {
              int i = KiROUND( d );
      
              printf( "t: %d  %.16g\n", i, d );
          }
      
          return 0;
      }
      c24863c0
  21. 17 Apr, 2012 1 commit
  22. 11 Apr, 2012 1 commit
  23. 10 Apr, 2012 1 commit
  24. 20 Feb, 2012 1 commit
  25. 08 Feb, 2012 1 commit
  26. 23 Jan, 2012 1 commit
  27. 22 Jan, 2012 1 commit
  28. 13 Jan, 2012 1 commit
  29. 10 Jan, 2012 1 commit
  30. 22 Dec, 2011 1 commit
  31. 30 Nov, 2011 1 commit
  32. 24 Nov, 2011 1 commit
  33. 15 Nov, 2011 1 commit
  34. 07 Jun, 2011 1 commit
    • Wayne Stambaugh's avatar
      EESchema bug fixes and other minor changes (fixes lp:793373). · baa0d792
      Wayne Stambaugh authored
      * Fix debug build warning (lp:793373).
      * Changed sheet edit restore and undo to use object copy and replace method.
      * Add minimum width and height constraints when resizing sheets that have
        hierarchical pins.
      * Fix drag sheet hot key bug.
      * Change Doxygen configuration to extract private methods and members
        when creating documentation.
      * Fix a bunch of Doxygen comment warnings.
      baa0d792
  35. 17 Mar, 2011 1 commit
  36. 23 Feb, 2011 1 commit
  37. 22 Feb, 2011 1 commit