Revision 11226

View differences:

branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/TableNumericFieldOperations.java
71 71
			}
72 72
			BigDecimal suma = new BigDecimal(0);
73 73
			BigDecimal min = new BigDecimal(Double.MAX_VALUE);
74
			BigDecimal max = new BigDecimal(Double.MIN_VALUE);
74
			BigDecimal max = new BigDecimal(Double.NEGATIVE_INFINITY);
75 75
			for(int i=selectedRows.nextSetBit(0); i>=0; i=selectedRows.nextSetBit(i+1)) {
76 76
				if (ds.getFieldValue(i, fieldIndex) instanceof NullValue)
77 77
					continue;
branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/PanelLegendBreaks.java
441 441

  
442 442
            //Date valorDate;
443 443
            double minValue = Double.MAX_VALUE;
444
            double maxValue = Double.MIN_VALUE;
444
            double maxValue = Double.NEGATIVE_INFINITY;
445 445

  
446 446
            //Date minValueDate = null;
447 447
            //Date maxValueDate = null;
branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/gui/dialogs/EventsFAlign.java
137 137
     */
138 138
    private void alignCenterV() {
139 139
        double xcenter = 0;
140
        double w = Double.MIN_VALUE;
140
        double w = Double.NEGATIVE_INFINITY;
141 141
        IFFrame[] fframes = m_layout.getFFrameSelected();
142 142

  
143 143
        for (int i = 0; i < fframes.length; i++) {
......
195 195
     * oriental.
196 196
     */
197 197
    private void alignRight() {
198
        double xmax = Double.MIN_VALUE;
198
        double xmax = Double.NEGATIVE_INFINITY;
199 199
        IFFrame[] fframes = m_layout.getFFrameSelected();
200 200

  
201 201
        for (int i = 0; i < fframes.length; i++) {
......
252 252
     * hacia abajo.
253 253
     */
254 254
    private void alignDown() {
255
        double ymax = Double.MIN_VALUE;
255
        double ymax = Double.NEGATIVE_INFINITY;
256 256
        IFFrame[] fframes = m_layout.getFFrameSelected();
257 257

  
258 258
        for (int i = 0; i < fframes.length; i++) {
......
361 361
     */
362 362
    private void alignCenterH() {
363 363
        double ycenter = 0;
364
        double h = Double.MIN_VALUE;
364
        double h = Double.NEGATIVE_INFINITY;
365 365
        IFFrame[] fframes = m_layout.getFFrameSelected();
366 366

  
367 367
        for (int i = 0; i < fframes.length; i++) {
......
419 419
     */
420 420
    private void distLeft() {
421 421
        double xmin = Double.MAX_VALUE;
422
        double xmax = Double.MIN_VALUE;
422
        double xmax = Double.NEGATIVE_INFINITY;
423 423
        int num = 0;
424 424
        IFFrame[] fframes = m_layout.getFFrameSelected();
425 425
        num = fframes.length;
......
490 490
     */
491 491
    private void distRight() {
492 492
        double xmin = Double.MAX_VALUE;
493
        double xmax = Double.MIN_VALUE;
493
        double xmax = Double.NEGATIVE_INFINITY;
494 494
        int num = 0;
495 495
        IFFrame[] fframes = m_layout.getFFrameSelected();
496 496
        num = fframes.length;
......
561 561
     */
562 562
    private void distUp() {
563 563
        double ymin = Double.MAX_VALUE;
564
        double ymax = Double.MIN_VALUE;
564
        double ymax = Double.NEGATIVE_INFINITY;
565 565
        int num = 0;
566 566
        IFFrame[] fframes = m_layout.getFFrameSelected();
567 567
        num = fframes.length;
......
633 633
     */
634 634
    private void distDown() {
635 635
        double ymin = Double.MAX_VALUE;
636
        double ymax = Double.MIN_VALUE;
636
        double ymax = Double.NEGATIVE_INFINITY;
637 637
        int num = 0;
638 638
        IFFrame[] fframes = m_layout.getFFrameSelected();
639 639
        num = fframes.length;
......
704 704
     */
705 705
    private void distCenterH() {
706 706
        double xmin = Double.MAX_VALUE;
707
        double xmax = Double.MIN_VALUE;
707
        double xmax = Double.NEGATIVE_INFINITY;
708 708
        int num = 0;
709 709
        IFFrame[] fframes = m_layout.getFFrameSelected();
710 710
        num = fframes.length;
......
777 777
     */
778 778
    private void distCenterV() {
779 779
        double ymin = Double.MAX_VALUE;
780
        double ymax = Double.MIN_VALUE;
780
        double ymax = Double.NEGATIVE_INFINITY;
781 781
        int num = 0;
782 782
        IFFrame[] fframes = m_layout.getFFrameSelected();
783 783
        num = fframes.length;
......
850 850
     * ancho.
851 851
     */
852 852
    private void sizeWidth() {
853
        double wmax = Double.MIN_VALUE;
853
        double wmax = Double.NEGATIVE_INFINITY;
854 854
        IFFrame[] fframes = m_layout.getFFrameSelected();
855 855

  
856 856
        for (int i = 0; i < fframes.length; i++) {
......
881 881
     * alto.
882 882
     */
883 883
    private void sizeHeight() {
884
        double hmax = Double.MIN_VALUE;
884
        double hmax = Double.NEGATIVE_INFINITY;
885 885
        IFFrame[] fframes = m_layout.getFFrameSelected();
886 886

  
887 887
        for (int i = 0; i < fframes.length; i++) {
......
915 915
        double total = 0;
916 916
        double num = 0;
917 917
        double xmin = Double.MAX_VALUE;
918
        double xmax = Double.MIN_VALUE;
918
        double xmax = Double.NEGATIVE_INFINITY;
919 919

  
920 920
        TreeMap treemap = new TreeMap();
921 921
        IFFrame[] fframes = m_layout.getFFrameSelected();
......
991 991
        double total = 0;
992 992
        double num = 0;
993 993
        double ymin = Double.MAX_VALUE;
994
        double ymax = Double.MIN_VALUE;
994
        double ymax = Double.NEGATIVE_INFINITY;
995 995

  
996 996
        TreeMap treemap = new TreeMap();
997 997
        IFFrame[] fframes = m_layout.getFFrameSelected();
branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/shp/SHP.java
165 165
        }
166 166

  
167 167
        double min = Double.MAX_VALUE;
168
        double max = Double.MIN_VALUE;
168
        double max = Double.NEGATIVE_INFINITY;
169 169

  
170 170
        for (int i = 0; i < zs.length; i++) {
171 171
            if (zs[i] > max) {
branches/v10/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/core/fmap/MaxFunction.java
45 45
 *
46 46
 * $Id$
47 47
 * $Log$
48
 * Revision 1.2  2006-06-20 18:19:43  azabala
48
 * Revision 1.2.2.1  2007-04-17 14:18:32  caballero
49
 * cambio MIN_VALUE por NEGATIVE_INFINITY
50
 *
51
 * Revision 1.2  2006/06/20 18:19:43  azabala
49 52
 * refactorizaci?n para que todos los nuevos geoprocesos cuelguen del paquete impl
50 53
 *
51 54
 * Revision 1.1  2006/05/24 21:12:16  azabala
......
68 71
 */
69 72
public class MaxFunction implements SummarizationFunction {
70 73

  
71
	double maxValue = Double.MIN_VALUE;
74
	double maxValue = Double.NEGATIVE_INFINITY;
72 75

  
73 76
	public void process(NumericValue value) {
74 77
		double val = value.doubleValue();
......
78 81
	}
79 82

  
80 83
	public NumericValue getSumarizeValue() {
81
		if(maxValue == Double.MIN_VALUE){
84
		if(maxValue == Double.NEGATIVE_INFINITY){
82 85
			//process method wasnt be called
83 86
			return ValueFactory.createValue(0d);
84 87
		}
......
90 93
	}
91 94

  
92 95
	public void reset() {
93
		maxValue = Double.MIN_VALUE;
96
		maxValue = Double.NEGATIVE_INFINITY;
94 97
		
95 98
	}
96 99

  
branches/v10/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/JoinCADTool.java
191 191
    }
192 192
    private boolean isIntoRect(Point2D p,Handler[] handlers) {
193 193
    	double tol=0.02;
194
    	double angle=Double.MIN_VALUE;
194
    	double angle=Double.NEGATIVE_INFINITY;
195 195

  
196 196
    	//for (int i=0;i<handlers.length;i++) {
197 197
    	//if (handlers.length>0) {
......
200 200
    			Point2D p1Aux=handlers[j].getPoint();
201 201
    			if (!handlers[0].equalsPoint(handlers[j])) {
202 202
    				double angleAux=UtilFunctions.getAngle(p0,p1Aux);
203
    				if (angle!=Double.MIN_VALUE && (angle>angleAux+tol || angle<angleAux-tol)) {
203
    				if (angle!=Double.NEGATIVE_INFINITY && (angle>angleAux+tol || angle<angleAux-tol)) {
204 204
    					return false;
205 205
    				}
206 206
    				angle=angleAux;

Also available in: Unified diff