DarkShadow44

Untitled

Dec 12th, 2024
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. BOOL ellipse_degnerated(const DC *dc, double width, double height)
  2. {
  3. const XFORM *xform = &dc->xformVport2World;
  4. double wsq = (width / 2) * (width / 2);
  5. double hsq = (height / 2) * (height / 2);
  6. const double a = (hsq * xform->eM11 * xform->eM11) + (wsq * xform->eM12 * xform->eM12);
  7. const double d = (hsq * wsq);
  8.  
  9. return sqrt(d / a) == 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment