Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*
- else if (!point.onCurve && !point_plus1.onCurve)
- {
- segment[0] = point.x * emScale;
- segment[1] = -point.y * emScale;
- segment[2] = midPoint(point.x, point_plus1.x) * emScale;
- segment[3] = -midPoint(point.y, point_plus1.y) * emScale;
- }
- private static double midPoint(int a, int b)
- {
- return a + (b - a) / 2.0;
- }
- *)
- let a = g.gs_x_coordinates.(p1) in
- let b = g.gs_x_coordinates.(p2) in
- let x = float_of_int (a + (b-a)/2) in
- let a = g.gs_y_coordinates.(p1) in
- let b = g.gs_y_coordinates.(p2) in
- let y = float_of_int (a + (b-a)/2) *. -1.0 in
Advertisement
Add Comment
Please, Sign In to add comment