NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

really new to arduino and coding, so I am trying to figure out this library. I have been searching and trying things out on my own, but haven't see any examples of using the 2 commands the way I am attempting. I think I have figured it out... at least it appears this snippet of my code is working.
What I am trying to do with this is return the center reading (median) out of 15. using convert_in to convert it to inches. I figure returning 15 readings, choosing the median one is the middle between the high and low readings.
Is this correct?

centerDist = (sonar.convert_in(sonar.ping_median(15)));
//median ping (out of 15), distance in inches and assign to centerDist on sensor named "sonar"

I run it and it seems to give me a very accurate reading, in inches. Is there anything wrong with this format?