실제치수 표시 다름 수정
This commit is contained in:
parent
1df321acf6
commit
e889b6b9b9
@ -3525,7 +3525,14 @@ export const calcLinePlaneSize = (points) => {
|
||||
* @returns number
|
||||
*/
|
||||
export const calcLineActualSize = (points, degree) => {
|
||||
const { x1, y1, x2, y2 } = points
|
||||
const planeSize = calcLinePlaneSize(points)
|
||||
const height = Big(Math.tan(Big(degree).times(Math.PI / 180))).times(planeSize)
|
||||
let height = Big(Math.tan(Big(degree).times(Math.PI / 180))).times(planeSize)
|
||||
/**
|
||||
* 대각선일 경우 높이 계산 변경
|
||||
*/
|
||||
if (x1 !== x2 && y1 !== y2) {
|
||||
height = Big(Math.tan(Big(degree).times(Math.PI / 180))).times(Big(x1).minus(x2).times(10).round())
|
||||
}
|
||||
return Big(planeSize).pow(2).plus(height.pow(2)).sqrt().abs().round().toNumber()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user