def mix(x, y, a):
    """
    re-implementation of opengl mix
    https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/mix.xhtml
    The return value is computed as x×(1−a)+y×a
    """
    return x * (1.0 - a) + y * a