Changeset ffae30 in git


Ignore:
Timestamp:
Aug 19, 2013, 9:52:02 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
Children:
44cd9a84967624b3cb752fb6646f1824acd60ae1
Parents:
f0befc6913ac431c7a04015ef50429a7966d716f
git-author:
Martin Lee <martinlee84@web.de>2013-08-19 21:52:02+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-08-30 13:48:36+02:00
Message:
chg: long instead of int
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cfNewtonPolygon.cc

    rf0befc rffae30  
    6565bool isLess (int* point1, int* point2)
    6666{
    67   int area= point1[0]*point2[1]- point1[1]*point2[0];
     67  long area= point1[0]*point2[1]- point1[1]*point2[0];
    6868  if (area > 0) return true;
    6969  if (area == 0)
     
    108108bool isConvex (int* point1, int* point2, int* point3)
    109109{
    110   int relArea= (point1[0] - point2[0])*(point3[1] - point2[1]) -
    111                (point1[1] - point2[1])*(point3[0] - point2[0]);
     110  long relArea= (point1[0] - point2[0])*(point3[1] - point2[1]) -
     111                (point1[1] - point2[1])*(point3[0] - point2[0]);
    112112  if (relArea < 0)
    113113    return true;
     
    153153  if (i + 1 <= sizePoints || i == sizePoints)
    154154  {
    155     int relArea=
     155    long relArea=
    156156    (points [i-2][0] - points [i-1][0])*(points [0][1] - points [i-1][1])-
    157157    (points [i-2][1] - points [i-1][1])*(points [0][0] - points [i-1][0]);
Note: See TracChangeset for help on using the changeset viewer.