I currently have a value that I need the user to adjust. Here's my current setup:
<input type="number" v-model="value" step="any"/>
However, the internal value is in radians while I want the user to see and input a degree value.
So, I want the displayed value (in degrees) to be synchronized bi-directionally with the internal value (in radians) using a multiplication factor. How can I achieve this in Vue.js?
In C#, I would accomplish something like this:
float internalValue;
float factor = 3.141/360;
float externalValue {get {return internalValue/factor} set {internalValue=value*factor}};
Is there a similar approach in JavaScript that will work seamlessly with the v-model binding?