๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ“ Development Study/๐Ÿ’ป Win32API

API Math

by eazuooz 2022. 10. 20.

์˜ˆ์ œ :)

https://github.com/eazuooz/WindowAPI/commit/8640c1b0193a760d7d45bfcfe3628f087b3aceea

 

Math · eazuooz/WindowAPI@8640c1b

Show file tree Showing 6 changed files with 121 additions and 62 deletions.

github.com

 

์—ฌ๋Ÿฌ๊ฐ€์ง€๋กœ ๊ฒŒ์ž„ ์ˆ˜ํ•™์— ํ•„์š”ํ•œ ํ•จ์ˆ˜๋“ค์„ ์ถ”๊ฐ€ํ•˜์˜€๋‹ค.

 

๊ฒŒ์ž„ ์ˆ˜ํ•™์— ํ•„์š”ํ•œ ์ •๋ณด๋“ค์€ ๋…ธํŠธ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ •๋ฆฌ ํ•ด ๋‘์—ˆ๋‹ค.

https://knouackr-my.sharepoint.com/:o:/g/personal/wnswo158_knou_ac_kr/EntR4XySKw1EtB3K8lZ4BNABYxwAWIuP6_LdQOPAbztIdA?e=HgCnyy 

namespace ya::math
{
    inline Vector2 Rotate(Vector2 vector, float degree)
    {
        float radian = (degree / 180.f) * PI;
        vector.Normalize();
        float x = cosf(radian) * vector.x - sinf(radian) * vector.y;
        float y = sinf(radian) * vector.x + cosf(radian) * vector.y;

        return Vector2(x, y);
    }

    inline float Dot(Vector2& v1, Vector2& v2)
    {
        return v1.x * v2.x + v1.y * v2.y;
    }

    inline float Cross(Vector2 v1, Vector2 v2)
    {
        return v1.x * v2.y - v1.y * v2.x;
    }
}

'๐Ÿ“ Development Study > ๐Ÿ’ป Win32API' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Clone Object(๋ณต์‚ฌ ์ƒ์„ฑ์ž)  (0) 2022.10.26
Rigidbody  (0) 2022.10.20
Animator  (1) 2022.10.13
Object Delete  (0) 2022.10.12
Alphablend, Camera Effect  (0) 2022.10.05

๋Œ“๊ธ€