5 type Ellipse (cx
: float, cy
: float, a
: float, b
: float, alpha
: float) =
10 member this
.Alpha = alpha
11 member this
.Area = a
* b
* Math.PI
13 // Does the ellipse contain the point (x, y)?.
14 member this
.Contains x y
=
15 ((x - cx
) * cos
alpha + (y
- cy
) * sin
alpha) ** 2.0 / a
** 2.0 + ((x - cx
) * sin
alpha - (y
- cy
) * cos
alpha) ** 2.0 / b
** 2.0 <= 1.0