Well, it seems the code would have to be converted from Java to DBC. It could be done, but it might be a lot of work.
Perhaps the route would be to start with basic physics equations and write them directly as functions for DBC and then build from there. For example:
a=F/m
acceleration of a body = force applied divided by the mass of the body
in DBC the function might look like
function acceleration_1(f#,m#)
a#=f#/m#
endfunction a#
And you could juggle it around to solve for other parts of the equation that you might not know:
function force_1(a#,m#)
f#=m#*a#
endfunction f#
function mass_1(a#,f#)
m#=f#/a#
endfunction m#
Now you have the startings of a physics library 100% DBC compatible; and so far will work in both 3d and 2d.
Enjoy your day.