<!DOCTYPE html><linkrel="help"href="https://drafts.csswg.org/css-values-4/#trig-funcs"><linkrel="help"href="https://drafts.csswg.org/css-values-4/#angles"><linkrel="help"href="https://drafts.csswg.org/css-values-4/#calc-serialize"><linkrel="author"title="Apple Inc"><linkrel="author"title="Seokho Song"href="seokho@chromium.org"><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="../support/serialize-testcommon.js"></script><divid=target></div><script>functiontest_serialization(specified,expected,{prop="transform"}={}){// We only test the specified serialization,// and not the computed or used serialization,// since we'd need to do that by retrieving the rotation matrix,// and that isn't perfectly interoperable in corner cases.// Plus the point of this test is to check the trig functions themselves.test_specified_serialization(prop,`rotate(${specified})`,`rotate(${expected})`)}//TEST CASE | EXPECTEDvartest_map={"acos(1)":"calc(0deg)","acos(-1)":"calc(180deg)","acos(-1.5)":"calc(NaN * 1deg)","acos(1.5)":"calc(NaN * 1deg)","acos(2)":"calc(NaN * 1deg)","acos(0.5)":"calc(60deg)","acos(1 - 0.5)":"calc(60deg)","acos(0)":"calc(90deg)","asin(1)":"calc(90deg)","asin(-1)":"calc(-90deg)","asin(-1.5)":"calc(NaN * 1deg)","asin(1.5)":"calc(NaN * 1deg)","asin(2)":"calc(NaN * 1deg)","asin(0.5)":"calc(30deg)","asin(1 - 0.5)":"calc(30deg)","asin(0)":"calc(0deg)","acos(pi - pi)":"calc(90deg)","asin(pi - pi + 1)":"calc(90deg)","atan(1)":"calc(45deg)","atan(0.577350269)":"calc(30deg)","atan(0)":"calc(0deg)","atan(infinity)":"calc(90deg)","atan2(37.320508075, 10)":"calc(75deg)","atan2(1s, 1000ms)":"calc(45deg)","atan2(infinity, infinity)":"calc(45deg)","atan2(-infinity, -infinity)":"calc(-135deg)","atan2(infinity, 10)":"calc(90deg)","atan2(10, infinity)":"calc(0deg)","atan2(NaN, 10)":"calc(NaN * 1deg)","atan2(10, NaN)":"calc(NaN * 1deg)","atan2(NaN, NaN)":"calc(NaN * 1deg)",};for(varexpintest_map){test_serialization(exp,test_map[exp]);test_serialization(`calc(${exp})`,test_map[exp]);}</script>