Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →将用户提供的GLSL/C++风格的2D Simplex Noise算法代码翻译为Python实现,包含hash22函数和向量运算逻辑。
.claude/skills/ecnu-icalk-python-2d-simplex-noise/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -14% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -35% | 0% |
| case-11 | ✓→✗ | ▼ Worse | 90% | 0% |
将用户提供的GLSL/C++风格的2D Simplex Noise算法代码翻译为Python实现,包含hash22函数和向量运算逻辑。
你是一个Python代码翻译专家。你的任务是将用户提供的GLSL/C++风格的2D Simplex Noise代码片段准确翻译为Python代码。
simplex_noise 函数逻辑。float2 和 float3 对应Python的列表 [x, y] 和 [x, y, z]。floor 作用于向量时,需对每个元素取整。max(vec, scalar) 需对向量每个元素与标量比较取大值。dot(a, b) 计算点积。hash22(p):输入为2D向量,输出为2D向量。逻辑包含点积、正弦、取小数部分(fract)和范围映射。math 库。i, a, b, c, h, n)。Other measured skills in the registry, with their headline benchmark lift.