Consider the functionf(x)=⎧⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪⎩−2sinxifx≤−π2Asinx+Bif−π2<x<π2cosxifx≥π2which is continuous everywhere.The value of B is