MCPcopy Create free account
hub / github.com/Kitware/VTK / evaluateLineXOnly

Function evaluateLineXOnly

Rendering/FreeType/vtkFreeTypeTools.cxx:1619–1622  ·  view source on GitHub ↗

Evaluate the line equation P(t) = p + t * v at the supplied t, and return the x value of the resulting point.

Source from the content-addressed store, hash-verified

1617// Evaluate the line equation P(t) = p + t * v at the supplied t, and return
1618// the x value of the resulting point.
1619inline int evaluateLineXOnly(const vtkVector2i& p, const vtkVector2i& v, float t)
1620{
1621 return p.GetX() + static_cast<int>(std::round(v.GetX() * t));
1622}
1623
1624// Given the corners of a rectangle (TL, TR, BL, BR), the vectors that
1625// separate them (dx = TR - TL = BR - BL, dy = TR - BR = TL - BL), and the

Callers 1

findScanRangeFunction · 0.85

Calls 2

roundFunction · 0.50
GetXMethod · 0.45

Tested by

no test coverage detected