SHARE
TWEET

Untitled

a guest Apr 18th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.     double p = perimeter() / 2;
  4.     double s = 0; //хранение результата
  5.     double sq = 1, sum;
  6.  
  7.     for (size_t i = 0; i < coordinates_.back() - 1; i++) //по точкам
  8.     {
  9.         sum = 0;
  10.  
  11.         for (size_t j = 0; j < M; j++) //по координатам
  12.             sum += (abs(coordinates_[i][j] - coordinates_[i + 1][j]))
  13.             * (abs(coordinates_[i][j] - coordinates_[i + 1][j]));
  14.  
  15.         sq *= p - sum;
  16.     }
  17.  
  18.     for (size_t j = 0; j < M; j++) //по координатам
  19.         sum += (abs(coordinates_[0][j] - coordinates_[coordinates_.back()][j]))
  20.         * (abs(coordinates_[0][j] - coordinates_[coordinates_.back()][j]));
  21.  
  22.     sq *= p - sum;
  23.     s = sqrt(sq);
  24.  
  25.     */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top