์ ์ฒด ๊ธ
[Spine, js] Math.atan ํ์ฉ
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan https://www.cuemath.com/trigonometry/arctan/ ์ผ๊ฐ๋ฒ์์ arctan ์ ์ญ ํ์ ํธ ํจ์๋ฅผ ๋ํ๋ ๋๋ค. ์ญ์ผ๊ฐ ํจ์๋ ์ผ๋ฐ์ ์ผ๋ก ์ ๋์ฌ - arc๋ฅผ ๋๋ฐํฉ๋๋ค. ์ํ์ ์ผ๋ก ์ฐ๋ฆฌ๋ arctan ๋๋ ์ญํ์ ํธ ํจ์๋ฅผ tan -1 x ๋๋ arctan(x)๋ก ๋ํ๋ ๋๋ค. ์ํฌํ ๊ณต์ ์์์ ๋ ผ์ํ ๋ฐ์ ๊ฐ์ด arctan์ ๊ธฐ๋ณธ ๊ณต์์ arctan(์์ง/๋ฐ๋ฉด) = θ๋ก ์ฃผ์ด์ง๋ฉฐ, ์ฌ๊ธฐ์ θ๋ ๋น๋ณ๊ณผ ์ง๊ฐ ์ผ๊ฐํ์ ๋ฐ๋ฉด ์ฌ์ด์ ๊ฐ๋์ ๋๋ค. ๊ฐ๋ θ์ ๊ฐ์ ๊ฐ๋ ๋๋ ๋ผ๋์์ผ๋ก ์ฐพ๊ธฐ ์ํด arctan์ ๋ํด ์ด ๊ณต์์ ์ฌ..
[Git ๊น ์์คํธ๋ฆฌ] ์์คํธ๋ฆฌ ๊ณต์ ๋ฉ๋ด์ผ ์ ์ฃผํ ์์
git reset HEAD --hard dev ๋ธ๋์น์์ qa๋ก ๋ด๊ฐ ๊ฐ๋ฐํ ๋ถ๋ถ๋ง ์ฒด๋ฆฌํฝํด์ผํ ๊ฒ์ ์ค์๋ก ๋ค๋ฅธ ๋ถ์ ๊ฐ๋ฐ ์ปค๋ฐ์ ์ฒด๋ฆฌํฝํ์ฌ์ ๊ณค๋์ ๊ฒช์ ๋ปํ์๋ค. git reset HEAD --hard ๋ก ์ด์ ์ฉกํ๊ฒ ๋จ์์๋ ๊ฒ๋ค ๋ค ๋ ๋ ค๋ฒ๋ฆฌ๊ณ ํ๋ฒ ๋ git pull ํ๊ณ ์ ์์ ์ผ๋ก ์ฒด๋ฆฌํฝ ์์ ๊ฐ์ ์ฌ๊ฑด์ ๊ณ๊ธฐ๋ก, ์ง์ฅ์์-์จ-git ์ธํ๋ฐ ๊ฐ์๋ฅผ ์ ์ฃผํํด๋ณด๋๋ก ํ๋ค. https://support.atlassian.com/bitbucket-cloud/docs/tutorial-learn-bitbucket-with-sourcetree/ Tutorial: Learn Bitbucket with Sourcetree | Bitbucket Cloud | Atlassian Support Want to mast..
ํ ์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (2)
1. chai mocha ๊ณตํ์์ chai ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ์ฒํ๋ฏ๋ก, ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ์ฉํด์ mocha + chai assert style ์์ ๋ฅผ ์์ฑํด๋ณด๊ฒ ๋ค. 2. chai ์ค์น Installation - Chai Installation Chai is available for both node.js and the browser using any test framework you like. There are also a number of other tools that include Chai. Node.js Package is available through npm: Recommend adding it to package.json devDependencies using www.chaijs.com ์๋ ๋ช ..
ํ ์คํธ ํ๋ ์์ํฌ Jest ๋ฉ์๋ ์ ๋ฆฌ
toBe const fn = { add: (num1, num2) => num1 + num2, } module.exports = fn; const fn = require('./fn'); test('์ฒซ๋ฒ์งธ ํ ์คํธ์ ๋๋ค!', () => { expect(1).toBe(1); }); test('์ด๊ฒ์ ํ์ดํ๋ค', () => { expect('ํ์ดํ').toBe('ํ์ดํ'); }); //์ฑ๊ณต ์ผ์ด์ค test('fn.add(2,3) = 5', () => { expect(fn.add(2, 3)).toBe(5); }); //์คํจ ์ผ์ด์ค test('fn.add(2,3) =! 7', () => { expect(fn.add(2, 3)).toBe(7); }); toEqual๊ณผ toS..
ํ ์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (1)
Mocha - the fun, simple, flexible JavaScript test framework Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct te mochajs.org ํ์ฌ์์ ํ ์คํธ ํ๋ ์์ํฌ ์ค jest์ mocha ์ค mocha๋ฅผ ์ฑํํ๋ ์ชฝ์ผ๋ก ๊ธฐ์ธ์ฌ์ง๊ณ ์๋ ๊ฒ ๊ฐ์์ mocha ๊ณต..
Array.CreateInstance ๋ฉ์๋
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { Array myArr1 = Array.CreateInstance(typeof(int),10); Console.Write($"myArr1.GetLowerBound(0) : {myArr1.GetLowerBound(0)} "); //0 Console.Write($"myArr1.GetUpperBound(0) : {myArr1.GetUpperBound(0)} "); //9 Con..
[HTML ์ขํ] x, y, ox, oy, Height, width
https://stackoverflow.com/questions/57068928/opencv-rect-conventions-what-is-x-y-width-height OpenCV Rect conventions – What is x, y, width, height? I'm studying the OpenCV tutorial found here. I am a little confused about what is represented in the following line of code: let trackWindow = new cv.Rect(150, 60, 63, 125); I'm not sure what the stackoverflow.com https://stackoverflow.com/questions..