Evaluate Bezier Curve like cubic-bezier in css

My problem is simple I want to get the value at a specific t value of a Bezier curve that has 2 points. One at position (0, 0) and the other at position (1, 1). Both have one tangent with both an x and y coordinate. Weirdly, when I scoured the internet I ended up with both the x and y coordinate at the t value. Is it possibly to make a method that takes both tangents x and y coordinates as a parameter and returns the evaluated value like it is with the cubic-bezier transition effect.

I have tried implementing Wikipedia’s formula for evaluating curves as well as De Casteljau’s algorithm but neither worked. I tried to just use the y coordinates but the the formula calculated all the x coordinates separately from the y coordinates. So the tangent x coordinates where not taken into account which is not what I want.

I don’t care about the programming language although Javascript would be preferred. Mathematical formulas would be OK too. Thanks in advance :).