Converts the specified angle from degrees to radians - CSharp System

CSharp examples for System:Math Geometry

Description

Converts the specified angle from degrees to radians

Demo Code

// Mapsui is free software; you can redistribute it and/or modify
using System.Collections.Generic;
using System;//from  w ww .  j a  v a2  s.c om

public class Main{
        /// <summary>
        ///     Converts the specified angle from degrees to radians
        /// </summary>
        /// <param name="degrees">Angle to convert (degrees)</param>
        /// <returns>Returns the angle in radians</returns>
        public static double DegreesToRadians(double degrees)
        {
            return degrees*Math.PI/180.0;
        }
}

Related Tutorials