8000 epsilon not declared in color_space.inl · Issue #1233 · g-truc/glm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
epsilon not declared in color_space.inl #1233
Closed
@chrismile

Description

@chrismile

When including color_space.hpp, I get the following errors:

In file included from ../src/../glm/include/glm/gtx/color_space.hpp:70,
                 from ../src/Main.cpp:5:
../src/../glm/include/glm/gtx/color_space.inl: In function ‘glm::vec<3, T, Q> glm::rgbColor(const glm::vec<3, T, Q>&)’:
../src/../glm/include/glm/gtx/color_space.inl:13:52: error: ‘epsilon’ was not declared in this scope
   13 |                 if(equal(hsv.y, static_cast<T>(0), epsilon<T>()))
      |                                                    ^~~~~~~
../src/../glm/include/glm/gtx/color_space.inl:13:61: error: expected primary-expression before ‘>’ token
   13 |                 if(equal(hsv.y, static_cast<T>(0), epsilon<T>()))
      |                                                             ^
../src/../glm/include/glm/gtx/color_space.inl:13:63: error: expected primary-expression before ‘)’ token
   13 |                 if(equal(hsv.y, static_cast<T>(0), epsilon<T>()))
      |                                                               ^
../src/../glm/include/glm/gtx/color_space.inl: In function ‘glm::vec<3, T, Q> glm::hsvColor(const glm::vec<3, T, Q>&)’:
../src/../glm/include/glm/gtx/color_space.inl:74:51: error: ‘epsilon’ was not declared in this scope
   74 |                 if(!equal(Max, static_cast<T>(0), epsilon<T>()))
      |                                                   ^~~~~~~
../src/../glm/include/glm/gtx/color_space.inl:74:60: error: expected primary-expression before ‘>’ token
   74 |                 if(!equal(Max, static_cast<T>(0), epsilon<T>()))
      |                                                            ^
../src/../glm/include/glm/gtx/color_space.inl:74:62: error: expected primary-expression before ‘)’ token
   74 |                 if(!equal(Max, static_cast<T>(0), epsilon<T>()))
      |                                                              ^
../src/../glm/include/glm/gtx/color_space.inl:79:60: error: expected primary-expression before ‘>’ token
   79 |                         if(equal(rgbColor.r, Max, epsilon<T>()))
      |                                                            ^
../src/../glm/include/glm/gtx/color_space.inl:79:62: error: expected primary-expression before ‘)’ token
   79 |                         if(equal(rgbColor.r, Max, epsilon<T>()))
      |                                                              ^
../src/../glm/include/glm/gtx/color_space.inl:82:65: error: expected primary-expression before ‘>’ token
   82 |                         else if(equal(rgbColor.g, Max, epsilon<T>()))
      |                                                                 ^
../src/../glm/include/glm/gtx/color_space.inl:82:67: error: expected primary-expression before ‘)’ token
   82 |                         else if(equal(rgbColor.g, Max, epsilon<T>()))
      |                                                                   ^

There's probably an include missing to glm/gtc/epsilon.hpp.

EDIT: Even including glm/gtc/epsilon.hpp beforehand seems to be insufficient. Is epsilon in a different namespace?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0