Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.
If you really need to set this static field, consider writing a thread-safe setter and atomic getter.
Consider assigning this magic number .5 to a constant.
Using constants for hard-coded numbers is a best practice. A constant’s name can explain the rationale
behind this magic number. It is also easier to find if you ever need to change it.
See this CWE advisory on why this is a security issue.