jan_flanders

Untitled

Dec 22nd, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (*
  2.                 else if (!point.onCurve && !point_plus1.onCurve)
  3.                 {
  4.                     segment[0] = point.x * emScale;
  5.                     segment[1] = -point.y * emScale;
  6.                     segment[2] = midPoint(point.x, point_plus1.x) * emScale;
  7.                     segment[3] = -midPoint(point.y, point_plus1.y) * emScale;
  8.         }
  9.             private static double midPoint(int a, int b)
  10.             {
  11.                 return a + (b - a) / 2.0;
  12.             }
  13. *)
  14.         let a = g.gs_x_coordinates.(p1) in
  15.         let b = g.gs_x_coordinates.(p2) in
  16.         let x = float_of_int (a + (b-a)/2) in
  17.        
  18.         let a = g.gs_y_coordinates.(p1) in
  19.         let b = g.gs_y_coordinates.(p2) in
  20.         let y = float_of_int (a + (b-a)/2) *. -1.0 in
Advertisement
Add Comment
Please, Sign In to add comment