fuckingtech/public/assets/glsl/lygia/math/mod289.wgsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

9 lines
382 B
WebGPU Shading Language

/*
contributors: [Stefan Gustavson, Ian McEwan]
description: modulus of 289
*/
fn mod289(x: f32) -> f32 { return x - floor(x * (1. / 289.)) * 289.; }
fn mod289_2(x: vec2f) -> vec2f { return x - floor(x * (1. / 289.)) * 289.; }
fn mod289_3(x: vec3f) -> vec3f { return x - floor(x * (1. / 289.)) * 289.; }
fn mod289_4(x: vec4f) -> vec4f { return x - floor(x * (1. / 289.)) * 289.; }