Liam W in memoriam 1998-2020 Dec 3, 2014 #1 And Google is using all of them: Really, I don't think it should go above 2 sig fig... Although three may be deemed acceptable. Liam
And Google is using all of them: Really, I don't think it should go above 2 sig fig... Although three may be deemed acceptable. Liam
Jeremy in memoriam 1991-2020 Dec 5, 2014 #4 XenResource_ControllerPublic_Author::actionView()'s $viewParams array contains this line: PHP: 'ratingAvg' => $resourceModel->getRatingAverage( $aggregate['rating_sum'], $aggregate['rating_count'] ), XenResource_Model_Resource::prepareResource() should contains this line: PHP: $resource['rating'] = $this->getRatingAverage($resource['rating_sum'], $resource['rating_count']); Both do not enable rounding, which is the 3rd parameter to getRatingAverage() (defaults to false).
XenResource_ControllerPublic_Author::actionView()'s $viewParams array contains this line: PHP: 'ratingAvg' => $resourceModel->getRatingAverage( $aggregate['rating_sum'], $aggregate['rating_count'] ), XenResource_Model_Resource::prepareResource() should contains this line: PHP: $resource['rating'] = $this->getRatingAverage($resource['rating_sum'], $resource['rating_count']); Both do not enable rounding, which is the 3rd parameter to getRatingAverage() (defaults to false).
Chris D XenForo developer Staff member Feb 11, 2015 #5 There was a third occurrence of the rating average not rounding, also, that I've fixed. Arguably we could have defaulted that method to round by default, but we'll avoid that in case anyone has extended or used that method in add-ons. Fixed thanks
There was a third occurrence of the rating average not rounding, also, that I've fixed. Arguably we could have defaulted that method to round by default, but we'll avoid that in case anyone has extended or used that method in add-ons. Fixed thanks