전체 글

· 알고리즘
알고리즘 분석 과제를 하던 중 생긴 오류 . . 전혀 예상 못한 오류였다. 구글링해서 금방 찾을 수 있었습니당 list1 = [1, 2] list1 = list.sort(list1) temp = list1[0] 와 같은 코드는 위 오류가 발생한다. 왜냐하면 list.sort()는 list를 변환 시킨 후 아무것도 변환하지 않기 때문이다. 따라서 위 코드는 list1의 배열을 지운 것과 같음 아래와 같이 바꿔줘야한다! list1 = [1, 2] list1.sort() temp = list1[0] print(temp) 나의 경우, self.arr 값에 list.arr()를 받아버려서 값을 지웠더니 오류가 발생했던 것 def __init__(self, n): self.arr = [random.randint(1..
DirectX로 시작하는 3D 게임 프로그래밍(이용희 지음) 해당 영상과 글을 통해 공부하며 정리한 글입니다 3D 그래픽을 공부하려고 보니까 선형대수를 몽땅 잊어먹었다ㅋㄲㄲㅋ 안 웃겨요 . . 그래서 다시 정리하는 벡터와 행렬 ! 💠벡터 벡터란 공간상의 한 점 또는 방향과 크기를 표현하는 개념이다. 3차원 벡터는 다음과 같은 자료구조로 표현할 수 있다. // 3차원 벡터 class CVector { public: float x; float y; float z; };[1] 벡터의 연산 CVector AddVector3D(CVector A, CVector B) { CVector C; C.x = A.x + B.x; C.y = A.y + B.y; C.z = A.z + B.z; return C; } CVector..
🔗https://www.youtube.com/watch?v=nQTiSLiNyk4&list=PLqCJpWy5Fohd3S7ICFXwUomYW0Wv67pDD&index=3 🔗 https://wiki.planetchili.net/index.php/Hardware_3D_(C%2B%2B_DirectX_Graphics)_Tutorial_2 Hardware 3D (C++ DirectX Graphics) Tutorial 0 - Chilipedia This video talks about the course syllabus for the Hardware 3D tutorial series (the shit we gonna learn) and the prerequisites for following this series (w..
🔗 https://www.youtube.com/watch?v=_4FArgOX1I4&list=PLqCJpWy5Fohd3S7ICFXwUomYW0Wv67pDD 🔗 https://wiki.planetchili.net/index.php/Hardware_3D_(C%2B%2B_DirectX_Graphics)_Tutorial_0 Hardware 3D (C++ DirectX Graphics) Tutorial 0 - Chilipedia This video talks about the course syllabus for the Hardware 3D tutorial series (the shit we gonna learn) and the prerequisites for following this series (what you..
· 알고리즘
✔️ Nested Function (중첩 함수) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # Nested function def print1(msg): def printer(): print(msg) printer() # call -> print() # Closure def print2(msg): def printer(): print(msg) # 외부에서 정의된 msg를 함수에서 사용 return printer # 내부에서 정의한 함수를 return print1("Hello1") ex = print2("Hello2") ex() # ex()를 call해야 printer()가 실행된다. cs 중첩 함수 print()는 부모 함수 print1() 안에서만 사용할 수 있다. ✔️ Closu..
minari
기록