ユーザ用ツール

サイト用ツール


cgfs:filled_triangles

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
cgfs:filled_triangles [2024/06/13 01:23] freemikancgfs:filled_triangles [2024/07/12 03:19] (現在) freemikan
行 1: 行 1:
-<codeprism lang=cpp el=true css=full>+{{:cgfs:filled_triangles-000.png?400|}} 
 + 
 +<file cpp>
 #include <raylib.h> #include <raylib.h>
  
行 108: 行 110:
  
     x01.pop_back();     x01.pop_back();
-    assert(x012.size() == x02.size()); 
  
     auto x012 = std::vector<float>(x01.size() + x12.size());     auto x012 = std::vector<float>(x01.size() + x12.size());
 +    assert(x012.size() == x02.size());
 +
     auto corner = std::copy(x01.begin(), x01.end(), x012.begin());     auto corner = std::copy(x01.begin(), x01.end(), x012.begin());
     std::copy(x12.begin(), x12.end(), corner);     std::copy(x12.begin(), x12.end(), corner);
行 117: 行 120:
     auto &x_right = x02;     auto &x_right = x02;
     auto m = x012.size() / 2;     auto m = x012.size() / 2;
- 
     if (x02[m] < x012[m]) {     if (x02[m] < x012[m]) {
         std::swap(x_left, x_right);         std::swap(x_left, x_right);
行 153: 行 155:
     }     }
 } }
-</codeprism>+</file>
  
cgfs/filled_triangles.1718209429.txt.gz · 最終更新: 2024/06/13 01:23 by freemikan

特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki