Newer
Older
cg / hw04 / src / Util.cpp
// Copyright (c) 2021. Pascal Syma <pascal@syma.dev> and Antonio Martinez Casadesus <acasadesus@stud.hs-bremen.de>.
// All rights reserved.

//
// Created by Pascal on 17.05.2021.
//

#include "Util.h"
#include <cmath>

#define PI 3.14159265358979323846

float Util::beta_n( int n)
{
    float an = (3.0f/8.0f) + float(pow((3.0f/8.0f) + (1.0f/4.0f)*cos(2.0f*PI/n), 2));

    return (8.0f/5.0f)*an - (3.0f/5.0f);
}