clockface

package
v0.0.0-...-d011049 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package clockface provides functions that calculate the positions of the hands. of an analogue clock,.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HoursInRadians

func HoursInRadians(t time.Time) float64

HoursInRadians returns the angle of the hour hand from 12 o'clock in radians.

func MinutesInRadians

func MinutesInRadians(t time.Time) float64

MinutesInRadians returns the angle of the minute hand from 12 o'clock in radians.

func SecondsInRadians

func SecondsInRadians(t time.Time) float64

SecondsInRadians returns the angle of the second hand from 12 o'clock in radians.

Types

type Point

type Point struct {
	X float64
	Y float64
}

A Point is a Cartesian coordinate. They are used in the package. to represent the unit vector from the origin of a clock hand.

func HourHandPoint

func HourHandPoint(t time.Time) Point

HourHandPoint is the unit vector of the hour hand at time `t`,. represented a Point.

func MinuteHandPoint

func MinuteHandPoint(t time.Time) Point

MinuteHandPoint is the unit vector of the minute hand at time `t`,. represented a Point.

func SecondHandPoint

func SecondHandPoint(t time.Time) Point

SecondHandPoint is the unit vector of the second hand at time `t`,. represented a Point.

Directories

Path Synopsis
Writes an SVG clockface of the current time to Stdout.
Writes an SVG clockface of the current time to Stdout.
Package svg produces an SVG clockface representation of a time.
Package svg produces an SVG clockface representation of a time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL