screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> </head> <body> <h4>Vue.js Convert Degree into Radians</h4> <div id="app"> <label for="degrees">Enter angle in degrees:</label> <input type="number" id="degrees" v-model="degrees"> <p>Radians: {{ radians }}</p> </div> <script type="module"> const app = Vue.createApp({ data() { return { degrees: 45 } }, computed: { radians() { return this.degrees * (Math.PI / 180); } } }); app.mount('#app'); </script> </body> </html>