MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / sdf_rounded_x

Function sdf_rounded_x

StereoKitC/utils/sdf.cpp:59–62  ·  view source on GitHub ↗

The MIT License Copyright (c) 2019 Inigo Quilez

Source from the content-addressed store, hash-verified

57// The MIT License
58// Copyright (c) 2019 Inigo Quilez
59float sdf_rounded_x(vec2 pt, float size, float radius) {
60 pt = vec2_abs(pt);
61 return vec2_magnitude(pt - fminf(pt.x + pt.y, size) * 0.5f) - radius;
62}
63
64///////////////////////////////////////////
65

Callers 1

ui_theming_initFunction · 0.85

Calls 2

vec2_absFunction · 0.85
vec2_magnitudeFunction · 0.85

Tested by

no test coverage detected