MCPcopy Create free account
hub / github.com/DFHack/dfhack / calc_line

Method calc_line

plugins/siege-engine.cpp:822–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820 }
821
822 void calc_line()
823 {
824 speed = goal - origin;
825 speed.x *= fudge_factor;
826 speed.y *= fudge_factor;
827 speed.z *= fudge_factor;
828 speed = speed + fudge_delta;
829 target = origin + speed;
830 divisor = point_distance(speed);
831 if (divisor <= 0) divisor = 1;
832 direction = df::coord(speed.x>=0?1:-1,speed.y>=0?1:-1,speed.z>=0?1:-1);
833 }
834
835 df::coord operator[] (int i) const
836 {

Callers

nothing calls this directly

Calls 1

point_distanceFunction · 0.85

Tested by

no test coverage detected