MCPcopy Create free account
hub / github.com/creatale/node-dv / from_direction

Method from_direction

deps/tesseract/ccstruct/points.cpp:115–119  ·  view source on GitHub ↗

Sets this with a unit vector in the given standard feature direction.

Source from the content-addressed store, hash-verified

113}
114// Sets this with a unit vector in the given standard feature direction.
115void FCOORD::from_direction(uinT8 direction) {
116 double radians = angle_from_direction(direction);
117 xcoord = cos(radians);
118 ycoord = sin(radians);
119}
120
121// Converts an angle in radians (from ICOORD::angle or FCOORD::angle) to a
122// standard feature direction as an unsigned angle in 256ths of a circle

Callers 3

NormalizeDirectionFunction · 0.80
MeanDirectionVectorFunction · 0.80
DrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected