MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetDirectionFit

Function GetDirectionFit

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:2349–2357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2347}
2348
2349static float GetDirectionFit( const Vector3& v0, const Vector3& v1 )
2350{
2351 float d = -Dot( v0, v1 );
2352 if( d < 0 )
2353 {
2354 return ( 1 - pow( std::abs( d ), 0.5f ) ) * 0.5f;
2355 }
2356 return ( pow( std::abs( d ), 0.5f ) + 1 ) * 0.5f;
2357}
2358
2359int EveSpaceObject2::GetGoodDamageLocatorIndex( const Vector3& position )
2360{

Callers 1

GetGoodLocatorIndexMethod · 0.85

Calls 1

DotFunction · 0.50

Tested by

no test coverage detected