각도 계산식 소수점 둘째자리까지 표시하도록 수정
This commit is contained in:
parent
01f160fa8b
commit
dfed51a758
@ -260,7 +260,7 @@ export const getDegreeByChon = (chon) => {
|
|||||||
// tan(theta) = height / base
|
// tan(theta) = height / base
|
||||||
const radians = Math.atan(chon / 10)
|
const radians = Math.atan(chon / 10)
|
||||||
// 라디안을 도 단위로 변환
|
// 라디안을 도 단위로 변환
|
||||||
return Number((radians * (180 / Math.PI)).toFixed(1))
|
return Number((radians * (180 / Math.PI)).toFixed(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user