Using the formula y=ax2 i can use a to find c, the distance to the focus and the directrix from the vertex, using the forumula a=1/4c

however i am trying to do this in code, so i need to isolate C on one side, and when i work it out i get c=1/4a, and that doesn't seem right...

Can some one enlighten me on this?