That is quite easy.
A cone is in it's essence just a piece of a circle which is cut off with a certain angle.
So, here is the procedure:
First, choose a point that represents the tip of the cone. Then you need the length of the cone (basically the radius of the circle that the cone is cut out off). After that you need to choose an angle that will represent the direction of the cone (consider it a line going from the tip to the end through the centre of the cone). Finally, you need an additional angle which represents how wide the cone is. Choosing the angle 45 here will result in your cone being 1/4 of a whole circle. 90 degrees results in 1/2 of a whole circle, and 180 will give you a whole circle. This angle basically represents the angle between the centre line and the edge of the cone.
Then you pick every unit in a circle around the tip of the cone with a radius equal to the length of the cone. Then you need to measure the angle between the tip of the cone, and the picked unit. If the absolute value (the value without any minus sign) of this angle, minus the direction of the cone, is less than the angle you chose which represents how wide the cone is, then the unit is in your cone.