mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-11 23:56:05 +00:00
This matches the term used in the WGSL spec. Change-Id: I4603332b828450c126ef806f1064ed54f372013f Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78787 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
22 lines
381 B
Plaintext
22 lines
381 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
|
|
struct modf_result {
|
|
float fract;
|
|
float whole;
|
|
};
|
|
modf_result tint_modf(float param_0) {
|
|
float whole;
|
|
float fract = modf(param_0, whole);
|
|
return {fract, whole};
|
|
}
|
|
|
|
kernel void tint_symbol() {
|
|
modf_result const res = tint_modf(1.230000019f);
|
|
float const fract = res.fract;
|
|
float const whole = res.whole;
|
|
return;
|
|
}
|
|
|