I know the math behind, and if you can see 2nd example, the angle is 4.712 radians, which is 270 degrees. The 90 degrees is a correct value if we use for example right hand rule to calculate angle. In this case I should either get 90 and -270 degress or both values as 90 degrees or both as -270, but a case where I get for nearly identical vectors values +90 and +270 degrees are at least strange. I definitely want to avoid implementing angle calculation methods if I can use the one implemented in RhinoCommons, but I need to get information if this is something I can overcome, or if this is a bug.
OK, so I came back to this example and actually used simpler form of the method without giving Normal vector. This gives predictable results and works correct. for both sets of input values.
angle = Vector3d.VectorAngle(tangent, x);