Revert "[symfont] Make sure variance is never negative (float precision issue)"
This reverts commit 5c025c6a03cca2ebe3390671a81aaca28492e71c. Investigating why I'm seeing non-negligible negative variance.
This commit is contained in:
parent
4d92fcb9be
commit
223ecc6453
@ -235,10 +235,10 @@ class GlyphStatistics(object):
|
|||||||
# Var(X) = E[X^2] - E[X]^2
|
# Var(X) = E[X^2] - E[X]^2
|
||||||
@property
|
@property
|
||||||
def VarianceX(self):
|
def VarianceX(self):
|
||||||
return max(0, self.Moment2XX / self.Area - self.MeanX**2)
|
return self.Moment2XX / self.Area - self.MeanX**2
|
||||||
@property
|
@property
|
||||||
def VarianceY(self):
|
def VarianceY(self):
|
||||||
return max(0, self.Moment2YY / self.Area - self.MeanY**2)
|
return self.Moment2YY / self.Area - self.MeanY**2
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def StdDevX(self):
|
def StdDevX(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user