This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <tchar.h> | |
LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); | |
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPInst, LPSTR lpCmd, int nCmd) | |
{ | |
WNDCLASSEX wc; | |
wc.cbClsExtra = sizeof(WNDCLASSEX); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <tchar.h> | |
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); | |
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPInst, LPSTR lpCmd, int nCmd) | |
{ | |
WNDCLASSEX wc; | |
wc.cbSize = sizeof(WNDCLASSEX); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://www5d.biglobe.ne.jp/~tomoya03/shtml/algorithm/IntersectionEX.htm | |
bool IL::ILZBuffer::IsTriangleInPoint(const ILVECTOR2 &A, const ILVECTOR2 &B, const ILVECTOR2 &C, const ILVECTOR2 &P) | |
{ | |
return IsCross(ILSEGMENT2(A,B),ILSEGMENT2(C,P)) && IsCross(ILSEGMENT2(B,C),ILSEGMENT2(A,P)) && IsCross(ILSEGMENT2(C,A),ILSEGMENT2(B,P)); | |
} | |
bool IL::ILZBuffer::IsCross(const ILSEGMENT2 &A,const ILSEGMENT2 &B) | |
{ | |
return !((IsCrossSub(A.a.x,A.b.x,B.a.x,B.b.x)) || (IsCrossSub(A.a.y,A.b.y,B.a.y,B.b.y))) && (((((A.a.x - A.b.x) * (B.a.y - A.a.y) + (A.a.y - A.b.y) * (A.a.x - B.a.x)) * ((A.a.x - A.b.x) * (B.b.y - A.a.y) + (A.a.y - A.b.y) * (A.a.x - B.b.x))) > 0.0F) && (((B.a.x - B.b.x) * (A.a.y - B.a.y) + (B.a.y - B.b.y) * (B.a.x - A.a.x)) * ((B.a.x - B.b.x) * (A.b.y - B.a.y) + (B.a.y - B.b.y) * (B.a.x - A.b.x)) > 0.0F)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <time.h> | |
using namespace std; | |
const double pi = 3.14159265F; | |
const double s2 = 1.41421356F; | |
const int n = 1000000000; | |
int main() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double Sqrt(const double &o) | |
{ | |
double s = o; | |
double t; | |
if(o == 0) | |
{ | |
return 0; | |
} | |
do | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const double uwaa = 100; | |
const double uwaaa = 50; | |
const int www = 5; | |
for(int i=-www;i<www;++i) | |
{ | |
for(int j=-www;j<www;++j) | |
{ | |
ILVECTOR a, b, c, d; | |
a = ILVECTOR(uwaa*IL::ILMath::Cos(i/www*M_PI) + uwaaa*IL::ILMath::Cos(i/www*M_PI)*IL::ILMath::Cos(j/www*M_PI), uwaaa*IL::ILMath::Sin(j/www), uwaa*IL::ILMath::Sin(i/www*M_PI) + uwaaa*IL::ILMath::Sin(i/www*M_PI)*IL::ILMath::Sin(j/www*M_PI)); | |
b = ILVECTOR(uwaa*IL::ILMath::Cos((i+1)/www*M_PI) + uwaaa*IL::ILMath::Cos((i+1)/www*M_PI)*IL::ILMath::Cos(j/www*M_PI), uwaaa*IL::ILMath::Sin(j/www), uwaa*IL::ILMath::Sin((i+1)/www*M_PI) + uwaaa*IL::ILMath::Sin((i+1)/www*M_PI)*IL::ILMath::Sin(j/www*M_PI)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1ターン: AI1] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
民兵を購入しました。 | |
[1ターン: aoisensi] | |
銅貨,銅貨を使用しました。 | |
地下貯蔵庫を購入しました。 | |
[2ターン: AI1] | |
銅貨,銅貨,銅貨を使用しました。 | |
銀貨を購入しました。 | |
(AI1がデッキを切り直しました。) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1ターン: らぁ] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
銀貨を購入しました。 | |
[1ターン: aoisensi] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
鍛冶屋を購入しました。 | |
[2ターン: らぁ] | |
銅貨,銅貨,銅貨を使用しました。 | |
村を購入しました。 | |
(らぁがデッキを切り直しました。) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1ターン: bgnori] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
民兵を購入しました。 | |
[1ターン: aoisensi] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
鍛冶屋を購入しました。 | |
[2ターン: bgnori] | |
銅貨,銅貨,銅貨を使用しました。 | |
工房を購入しました。 | |
(bgnoriがデッキを切り直しました。) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1ターン: bgnori] | |
銅貨,銅貨,銅貨を使用しました。 | |
銀貨を購入しました。 | |
[1ターン: aoisensi] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
祝宴を購入しました。 | |
[2ターン: bgnori] | |
銅貨,銅貨,銅貨,銅貨を使用しました。 | |
金貸しを購入しました。 | |
(bgnoriがデッキを切り直しました。) |
OlderNewer