diff --git a/src/components/floor-plan/modal/basic/step/Orientation.jsx b/src/components/floor-plan/modal/basic/step/Orientation.jsx index 3ef15a21..98e10c0c 100644 --- a/src/components/floor-plan/modal/basic/step/Orientation.jsx +++ b/src/components/floor-plan/modal/basic/step/Orientation.jsx @@ -6,6 +6,19 @@ export default function Orientation({ setTabNum }) { const [compasDeg, setCompasDeg] = useState(0) const [hasAnglePassivity, setHasAnglePassivity] = useState(false) + const getDegree = (degree) => { + if (degree % 15 === 0) return degree + + let value = Math.floor(degree / 15) + const remain = ((degree / 15) % 1).toFixed(5) + + if (remain > 0.4) { + value++ + } + + return value * 15 + } + return ( <>