PHP:
//
// Summary:
// Returns a boolean indicating whether you are behind a target. A parameter
// indicates the wideness of the cone used to test.
//
// Parameters:
// me:
// Position of me.
//
// target:
// Position of target.
//
// targetFacingRadians:
// Facing of target in radians.
//
// arcRadians:
// The arc to test against in radians. PI is the default value.
public static bool IsBehind(WoWPoint me, WoWPoint target, float targetFacingRadians, float arcRadians = 3.14159f);
Please add to documentation that arcRadians defines "in front" arc, not "in behind" arc.

Arrow - facing
Red - arcRadians cone you pass to function,
Green - where it returns true,
Tested it on Training Dummy moving around step by step in "walk mode" with PI*0.8 and PI*1.2.
First one had true/false border slightly in front and second slightly behind, exactly the other way you would expect it to work.
Obviously on first one i couldn't use Backstab, but it still returned true.
In extreme cases:
Right now when you want to check "exactly behind" with PI/6 arc (30 degrees) it will do exactly opposite and return true anytime you are not "exactly in front".
To actually check "exactly behind" you need to pass 2*PI - PI/6 - 330 degrees arc.
imo best way to "fix" the function would be adding clear statement in description.
Last edited: