This is my notepad where i collect the useful snippets of OpenSCAD code that i use over and over. Some better curated than others, some formatted for clarity some for efficiency.
a=[10,0,0]; b=[0,10,0]; echo(angle(a,b)); function angle (a,b)=atan2(norm(cross(a,b)),a*b);