class_docstr: Pen calculating area, center of mass, variance and
  standard-deviation, covariance and correlation, and slant,
  of glyph shapes.
  
  Note that if the glyph shape is self-intersecting, the values
  are not correct (but well-defined). Moreover, area will be
  negative if contour directions are clockwise.
class_docstr_tok: ["Pen","calculating","area",",","center","of","mass",",","variance","and","standard-deviation",",","covariance","and","correlation",",","and","slant",",","of","glyph","shapes",".","Note","that","if","the","glyph","shape","is","self-intersecting",",","the","values","are","not","correct","(","but","well-defined",")",".","Moreover",",","area","will","be","negative","if","contour","directions","are","clockwise","."]
code: def _update(self):
      area = self.area
      if not area:
          self._zero()
          return
  
      # Center of mass
      # https://en.wikipedia.org/wiki/Center_of_mass#A_continuous_volume
      self.meanX = meanX = self.momentX / area
      self.meanY = meanY = self.momentY / area
  
      # Var(X) = E[X^2] - E[X]^2
      self.varianceX = self.momentXX / area - meanX * meanX
      self.varianceY = self.momentYY / area - meanY * meanY
  
      # Covariance(X,Y) = (E[X.Y] - E[X]E[Y])
      self.covariance = self.momentXY / area - meanX * meanY
  
      StatisticsBase._update(self)
  
imports: from math import sqrt, degrees, atan
  from fontTools.pens.basePen import BasePen, OpenContourError
  from fontTools.pens.momentsPen import MomentsPen
label_desc: Use image node_id 3 for calling the StatisticsPen obj's underlying member method code with example usage: obj._update() without return types