理解具有大于和小于运算符的代码

Understanting code with greater than and less than operators

我正在尝试理解这行代码。

FastLED.addLeds<WS2812, PIN, GRB>(leds, NUM_LEDS);

它是 Arduino ambilight.ino 的一部分,并使用 FastLED 库。它似乎与 led 条纹的初始化有关,但我不明白 < 和 > 符号是如何使用的,如果它们是比较器或其他东西...

我懂一点编码,但这个让我很困惑。

干杯。

我没有太多东西可以尝试,只是想了解代码。

代码运行正常,只是想了解一下。

这是一个模板,请在此处阅读有关模板的更多信息:http://www.cplusplus.com/doc/oldtutorial/templates/

您可以在此处查看 FastLed 库中模板的定义:https://github.com/FastLED/FastLED/blob/master/FastLED.h#L390