getCentroid function

List<double?> getCentroid(
  1. dynamic latitude,
  2. dynamic longitude,
  3. dynamic height,
  4. dynamic width,
)

Get centroid

Implementation

List<double?> getCentroid(latitude, longitude, height, width) {
  double? centeredY = latitude + (height / 2);
  double? centeredX = longitude + (width / 2);

  return [centeredX, centeredY];
}