Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{plane_display.cpp} Namespace Reference

Functions

float Degree2Radian (float angle)
 
float GetDangerRate (Radar::Sensor::ThreatLevel::Value threat)
 

Function Documentation

float anonymous_namespace{plane_display.cpp}::Degree2Radian ( float  angle)

Definition at line 18 of file plane_display.cpp.

References M_PI.

Referenced by Radar::PlaneDisplay::OnDockEnd(), and Radar::PlaneDisplay::OnJumpEnd().

19 {
20  const float ratio = M_PI / 180.0;
21  return angle * ratio;
22 }
float anonymous_namespace{plane_display.cpp}::GetDangerRate ( Radar::Sensor::ThreatLevel::Value  threat)

Definition at line 24 of file plane_display.cpp.

References Radar::Sensor::ThreatLevel::High, and Radar::Sensor::ThreatLevel::Medium.

25 {
26  using namespace Radar;
27 
28  switch (threat)
29  {
31  return 20.0; // Fast pulsation
32 
34  return 7.5; // Slow pulsation
35 
36  default:
37  return 0.0; // No pulsation
38  }
39 }