Required velocity of each wheel in 3-wheel omni bot
This is a simple trig problem:

S = desired speed
a = desired angle of travel relative to wheel


If the robot is oriented with a wheel sideways on the front of the robot, then wheel offsets will be 90, 210, 330 (front, right, left).

a = desired angle of travel + offset angle of wheel
sin(a) = M / s
M = S * sin(a)


Repeat for each wheel.

Once you write the code, do a quick check for a=0 and make sure M=S and for a=90 and make sure M=0.

(edit: angles corrected, my bad)