JSFiddle - React, Tailwind, and code Playground
JavaScript
/*
* more interesting than the exact number of characters is
* the algorithm: convert h and m to a number representing
* the time elapsed since 12:00, then multiply that number
* by the number of degress the angle grows for that unit of
* time.
*/
//20
function angle(h,m){return(h+m/60)*11/12%1*360}
//17
function angle(h,m){return(h+m/60)*11%12*30}
//16
function angle(h,m){return(h+m/60)*330%360}
//16
function angle(h,m){return(h*60+m)*5.5%360}
/* dc versions
//14, including 2 for input
dc -e '?60*?+5.5*360%p'
//14, including 2 for input
//doesn't work because of precision issues
dc -e '??60/+330*360%p'
//13
dc -e '12 15 r60*+5.5*360%p'
//12, but you must switch input order
dc -e '15 12 60*+5.5*360%p'
//12
//doesn't work because of precision issues, but there's probably a way to fix it
dc -e '12 15 60/+330*360%p'
*/