MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / gradientAngle

Function gradientAngle

packages/backend/src/common/color.ts:62–65  ·  view source on GitHub ↗
(fill: GradientPaint)

Source from the content-addressed store, hash-verified

60
61// ---- Gradient Transformation ----
62export const gradientAngle = (fill: GradientPaint): number => {
63 const [start, end] = fill.gradientHandlePositions;
64 return calculateAngle(start, end);
65};
66
67/**
68 * Calculate the angle between two points in degrees

Callers 2

tailwindGradientFunction · 0.90
swiftuiGradientFunction · 0.90

Calls 1

calculateAngleFunction · 0.85

Tested by

no test coverage detected