easy-util-tools
  • 👋Welcome to easy-util-tools
  • baseClass(基本类)
    • Color(颜色)
    • Point(点)
    • Line(线)
    • Circle(圆)
    • Rectangle(矩形)
    • Gradient(渐变色)
    • TimeMonitoring(时间统计)
  • utils(工具)
    • formatAmount(格式金额)
    • getStandardCoordinate
Powered by GitBook
On this page
  1. baseClass(基本类)

Circle(圆)

// Import the class
import { Line } from 'easy-util-tools'

/**
 * 创建圆实例
 * Create a circle instance
 * @param center type Point
 * @param radius type number
 */
let circle = new Circle(center, radius);
/**
 * 获取圆上的点
 * Gets the point on the circle
 * @param angle 点所在的角度 The angle at which the point is located
 * @param startDirection 起始方向 Start direction 'top' | 'right' | 'bottom' | 'left' defalute right
 * @param clockwiseOrNot 是否为顺时针 Whether it is clockwise
 */
 let point = circle.getPointOnCircle(
    45,
    'right',
    false,
  )
PreviousLine(线)NextRectangle(矩形)

Last updated 2 years ago