# Commits

committed b3129d8

Added epsilon usage for the math module documentation.

• Participants

# File doc/capi/math.rst

` ------`
` .. data:: VEC_EPSILON`
` `
`-  .. todo::`
`-    Detailled description about the eps usage.`
`+  A small fractional value to come around rounding issues on floating`
`+  point calculations. VEC_EPSILON is usually used to soothe rounding`
`+  differences and thus to allow the system to return an appropriate`
`+  state, with a small tradeoff for the exactness.`
`+`
`+  **Example:** ::`
`+`
`+     (0.0000000000001 - 0.0000000000009) == 0.0`
`+`
`+  Given that VEC_EPSILON is large enough, the above calculation will be`
`+  true. To get over rounding issues on vector operations with small`
`+  fractional parts or to make them more exact, the concrete epsilon`
`+  value can be adjusted on a per :class:`PyVector` basis.`
` `
` Functions`
` ---------`
` `
`   The vector coordinates. It holds up to *dim* values.`
`   `
`-.. cmember:: Py_ssize_t PyVector.dim;`
`+.. cmember:: Py_ssize_t PyVector.dim`
` `
`   The number of dimensions (coordinate values), the PyVector can hold.`
` `
` .. cmember:: double PyVector.epsilon`
` `
`-  .. todo::`
`-    Detailled description about the eps usage.`
`+  The fractional delta to use for soothing round differences for`
`+  floating point operations on the PyVector. see :cdata:`VEC_EPSILON``
`+  for more details.`
` `
` Functions`
` ^^^^^^^^^`

# File doc/src/mathbase.xml

`       <desc>Gets the length of the :class:`Vector`.</desc>`
`     </attr>`
`     <attr name="epsilon">`
`-      <desc>Gets or sets the exactness delta of the :class:`Vector`.</desc>`
`+      <desc>Gets or sets the exactness delta of the :class:`Vector`.`
`+      `
`+      epsilon represents a small fractional value to come around`
`+      rounding issues on floating point calculations. It is usually used`
`+      to soothe rounding differences and thus to allow the system to`
`+      return an appropriate state, with a small tradeoff for the`
`+      exactness.`
`+`
`+      **Example:** ::`
`+`
`+        (0.0000000000001 - 0.0000000000009) == 0.0`
`+`
`+      Given that epsilon is large enough, the above calculation will be`
`+      true. To get over rounding issues on vector operations with small`
`+      fractional parts or to make them more exact, the concrete epsilon`
`+      value can be freely adjusted.`
`+      </desc>`
`     </attr>`
`     <attr name="elements">`
`       <desc>Gets or sets the elements of the :class:`Vector`.`