Back to index

texmacs  1.0.7.15
Functions
vpenalty.cpp File Reference
#include "vpenalty.hpp"

Go to the source code of this file.

Functions

tm_ostreamoperator<< (tm_ostream &out, vpenalty pen)
vpenalty as_vpenalty (SI diff)

Function Documentation

vpenalty as_vpenalty ( SI  diff)

Definition at line 20 of file vpenalty.cpp.

                      {
  if (diff < 0) diff= -diff;
  if (diff < 0x1000) return vpenalty (0, (diff*diff) >> 16);
  else if (diff < 0x100000) return vpenalty (0, (diff >> 8) * (diff >> 8));
  else return vpenalty (0, 0x1000000);
}

Here is the caller graph for this function:

tm_ostream& operator<< ( tm_ostream out,
vpenalty  pen 
)

Definition at line 15 of file vpenalty.cpp.

                                            {
  return out << "[ " << pen->pen << ", " << pen->exc << " ]";
}