Back to index

texmacs  1.0.7.15
Functions
concat_post.cpp File Reference
#include "concater.hpp"

Go to the source code of this file.

Functions

SI italic_correction (box, box)

Function Documentation

SI italic_correction ( box  ,
box   
)

Definition at line 27 of file math_boxes.cpp.

                                 {
  double slope_L= L->right_slope ();
  double slope_R= R->left_slope ();
  if (slope_L == slope_R) return 0;
  if (slope_L * slope_R == 0.0)
    return L->right_correction () + R->left_correction ();
  double M= (slope_L <= slope_R? slope_R: slope_L);
  if (M<0) M= (slope_L >= slope_R? slope_R: slope_L);
  double factor= (slope_R- slope_L) / M;
  if (factor < 0) factor= -factor;
  return (SI) (factor * (L->right_correction () + R->left_correction ()));
}